From e38e8b15aee8668b14530152a3683e8f1cb79a86 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 27 Sep 2022 16:49:31 +0200 Subject: [PATCH] Update lxd version to 5.0 Change-Id: I8f220a98d5e1eff1e5a621c269d80062d3f3e43d Signed-off-by: garciadeblas Signed-off-by: Mark Beierl --- installers/charmed_install.sh | 9 +++++++-- installers/full_install_osm.sh | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/installers/charmed_install.sh b/installers/charmed_install.sh index 2cd9a07c..49c5fb5d 100755 --- a/installers/charmed_install.sh +++ b/installers/charmed_install.sh @@ -15,7 +15,7 @@ # set -eux -LXD_VERSION=4.0 +LXD_VERSION=5.0 JUJU_VERSION=2.9 JUJU_AGENT_VERSION=2.9.33 K8S_CLOUD_NAME="k8s-cloud" @@ -177,7 +177,12 @@ EOF sudo sysctl --system # Install LXD snap sudo apt-get remove --purge -y liblxc1 lxc-common lxcfs lxd lxd-client - sudo snap install lxd --channel $LXD_VERSION/stable + snap info lxd | grep installed > /dev/null + if [ $? -eq 0 ]; then + sudo snap refresh lxd --channel $LXD_VERSION/stable + else + sudo snap install lxd --channel $LXD_VERSION/stable + fi # Configure LXD sudo usermod -a -G lxd `whoami` cat /usr/share/osm-devops/installers/lxd-preseed.conf | sed 's/^config: {}/config:\n core.https_address: '$LXDENDPOINT':8443/' | sg lxd -c "lxd init --preseed" diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 58958c9e..d2f5e524 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -162,7 +162,12 @@ function install_lxd() { # Install LXD snap sudo apt-get remove --purge -y liblxc1 lxc-common lxcfs lxd lxd-client - sudo snap install lxd --channel $LXD_VERSION/stable + snap info lxd | grep installed > /dev/null + if [ $? -eq 0 ]; then + sudo snap refresh lxd --channel $LXD_VERSION/stable + else + sudo snap install lxd --channel $LXD_VERSION/stable + fi # Configure LXD sudo usermod -a -G lxd `whoami` @@ -871,7 +876,7 @@ function ctrl_c() { [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } -LXD_VERSION=4.0 +LXD_VERSION=5.0 JUJU_VERSION=2.9 JUJU_AGENT_VERSION=2.9.29 UNINSTALL="" -- 2.25.1