qw953@qw953-virtual-machine:~/ric-dep/bin$ ./install_k8s_and_helm.sh + KUBEV=1.16.0 + KUBECNIV=0.7.5 + HELMV=3.5.4 + DOCKERV=20.10.12 + echo running ./install_k8s_and_helm.sh running ./install_k8s_and_helm.sh + getopts :k:d:e:n:c o + [[ 3.5.4 == 2.* ]] + set -x + export DEBIAN_FRONTEND=noninteractive + DEBIAN_FRONTEND=noninteractive ++ hostname -I ++ hostname + echo '192.168.128.129 qw953-virtual-machine' ./install_k8s_and_helm.sh: line 97: /etc/hosts: Permission denied + printenv SHELL=/bin/bash SESSION_MANAGER=local/qw953-virtual-machine:@/tmp/.ICE-unix/1786,unix/qw953-virtual-machine:/tmp/.ICE-unix/1786 QT_ACCESSIBILITY=1 COLORTERM=truecolor XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg SSH_AGENT_LAUNCHER=gnome-keyring XDG_MENU_PREFIX=gnome- GNOME_DESKTOP_SESSION_ID=this-is-deprecated LANGUAGE=en_GB:en GNOME_SHELL_SESSION_MODE=ubuntu SSH_AUTH_SOCK=/run/user/1000/keyring/ssh XMODIFIERS=@im=ibus DESKTOP_SESSION=ubuntu GTK_MODULES=gail:atk-bridge PWD=/home/qw953/ric-dep/bin XDG_SESSION_DESKTOP=ubuntu LOGNAME=qw953 XDG_SESSION_TYPE=wayland SYSTEMD_EXEC_PID=1839 XAUTHORITY=/run/user/1000/.mutter-Xwaylandauth.9WY7Z1 HOME=/home/qw953 USERNAME=qw953 IM_CONFIG_PHASE=1 LANG=en_GB.UTF-8 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: XDG_CURRENT_DESKTOP=ubuntu:GNOME VTE_VERSION=6800 WAYLAND_DISPLAY=wayland-0 GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/fac4d2c9_3ebf_4b48_b69e_080ab43ae386 GNOME_SETUP_DISPLAY=:1 LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=qw953 GNOME_TERMINAL_SERVICE=:1.109 DISPLAY=:0 SHLVL=2 QT_IM_MODULE=ibus XDG_RUNTIME_DIR=/run/user/1000 XDG_DATA_DIRS=/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin GDMSESSION=ubuntu DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEBIAN_FRONTEND=noninteractive OLDPWD=/home/qw953/ric-dep _=/usr/bin/printenv + IPV6IF= + rm -rf /opt/config + mkdir -p /opt/config mkdir: cannot create directory ‘/opt/config’: Permission denied + echo '' ./install_k8s_and_helm.sh: line 104: /opt/config/docker_version.txt: No such file or directory + echo 1.16.0 ./install_k8s_and_helm.sh: line 105: /opt/config/k8s_version.txt: No such file or directory + echo 0.7.5 ./install_k8s_and_helm.sh: line 106: /opt/config/k8s_cni_version.txt: No such file or directory + echo 3.5.4 ./install_k8s_and_helm.sh: line 107: /opt/config/helm_version.txt: No such file or directory ++ hostname -I + echo '192.168.128.129 ' ./install_k8s_and_helm.sh: line 108: /opt/config/host_private_ip_addr.txt: No such file or directory ++ curl ifconfig.co ./install_k8s_and_helm.sh: line 109: curl: command not found + echo '' ./install_k8s_and_helm.sh: line 109: /opt/config/k8s_mst_floating_ip_addr.txt: No such file or directory ++ hostname -I + echo '192.168.128.129 ' ./install_k8s_and_helm.sh: line 110: /opt/config/k8s_mst_private_ip_addr.txt: No such file or directory + echo __mtu__ ./install_k8s_and_helm.sh: line 111: /opt/config/mtu.txt: No such file or directory + echo __cinder_volume_id__ ./install_k8s_and_helm.sh: line 112: /opt/config/cinder_volume_id.txt: No such file or directory ++ hostname + echo qw953-virtual-machine ./install_k8s_and_helm.sh: line 113: /opt/config/stack_name.txt: No such file or directory + ISAUX=false ++ cat /opt/config/stack_name.txt cat: /opt/config/stack_name.txt: No such file or directory + [[ '' == *aux* ]] + modprobe -- ip_vs modprobe: ERROR: could not insert 'ip_vs': Operation not permitted + modprobe -- ip_vs_rr modprobe: ERROR: could not insert 'ip_vs_rr': Operation not permitted + modprobe -- ip_vs_wrr modprobe: ERROR: could not insert 'ip_vs_wrr': Operation not permitted + modprobe -- ip_vs_sh modprobe: ERROR: could not insert 'ip_vs_sh': Operation not permitted + modprobe -- nf_conntrack_ipv4 modprobe: FATAL: Module nf_conntrack_ipv4 not found in directory /lib/modules/5.15.0-60-generic + modprobe -- nf_conntrack_ipv6 modprobe: FATAL: Module nf_conntrack_ipv6 not found in directory /lib/modules/5.15.0-60-generic + modprobe -- nf_conntrack_proto_sctp modprobe: FATAL: Module nf_conntrack_proto_sctp not found in directory /lib/modules/5.15.0-60-generic + '[' '!' -z '' ']' ++ sed '/^[ \t]*#/ d' ++ sed 's/[\t ]/ /g' ++ tr -s ' ' ++ cut -f1 '-d ' ++ grep swap /etc/fstab + SWAPFILES=/swapfile + '[' '!' -z /swapfile ']' + for SWAPFILE in $SWAPFILES + '[' '!' -z /swapfile ']' + echo 'disabling swap file /swapfile' disabling swap file /swapfile + [[ /swapfile == UUID* ]] + swapoff /swapfile swapoff: Not superuser. + sed -i '\%/swapfile%d' /etc/fstab sed: couldn't open temporary file /etc/sedjfIobY: Permission denied + echo '### Docker version = 20.10.12' ### Docker version = 20.10.12 + echo '### k8s version = 1.16.0' ### k8s version = 1.16.0 + echo '### helm version = 3.5.4' ### helm version = 3.5.4 + echo '### k8s cni version = 0.7.5' ### k8s cni version = 0.7.5 + KUBEVERSION=1.16.0-00 + CNIVERSION=0.7.5-00 + DOCKERVERSION=20.10.12 ++ lsb_release -r ++ sed 's/^[a-zA-Z:\t ]\+//g' + UBUNTU_RELEASE=22.04 + [[ 22.04 == 16.* ]] + [[ 22.04 == 18.* ]] + [[ 22.04 == 20.* ]] + echo 'Unsupported Ubuntu release (22.04) detected. Exit.' Unsupported Ubuntu release (22.04) detected. Exit. + echo 'docker version to use = 20.10.12' docker version to use = 20.10.12 + curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg ./install_k8s_and_helm.sh: line 181: curl: command not found + apt-key add - Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). E: This command can only be used by root. + echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main' ./install_k8s_and_helm.sh: line 182: /etc/apt/sources.list.d/kubernetes.list: Permission denied + mkdir -p /etc/apt/apt.conf.d + echo 'APT::Acquire::Retries "3";' ./install_k8s_and_helm.sh: line 185: /etc/apt/apt.conf.d/80-retries: Permission denied + apt-get update Reading package lists... Done E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied) W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied) ++ apt-get install -y curl jq netcat make ipset moreutils + RES='E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?' + [[ E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? == */var/lib/dpkg/lock* ]] + echo 'Fail to get dpkg lock. Wait for any other package installation' Fail to get dpkg lock. Wait for any other package installation + echo 'process to finish, then rerun this script' process to finish, then rerun this script + exit -1