From 73b3cad0b877ec6b3199c29d6afdf4e9a570df72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Mon, 22 Aug 2022 17:20:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix=20a=20couple=20of=20issues?= =?UTF-8?q?=20related=20to=20OCI=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare-vms/lib/commands.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/prepare-vms/lib/commands.sh b/prepare-vms/lib/commands.sh index dcd499f7..11d7af89 100644 --- a/prepare-vms/lib/commands.sh +++ b/prepare-vms/lib/commands.sh @@ -182,9 +182,23 @@ _cmd_clusterize() { pssh " if [ -f /etc/iptables/rules.v4 ]; then sudo sed -i 's/-A INPUT -j REJECT --reject-with icmp-host-prohibited//' /etc/iptables/rules.v4 + sudo netfilter-persistent flush sudo netfilter-persistent start fi" + # oracle-cloud-agent upgrades pacakges in the background. + # This breaks our deployment scripts, because when we invoke apt-get, it complains + # that the lock already exists (symptom: random "Exited with error code 100"). + # Workaround: if we detect oracle-cloud-agent, remove it. + # But this agent seems to also take care of installing/upgrading + # the unified-monitoring-agent package, so when we stop the snap, + # it can leave dpkg in a broken state. We "fix" it with the 2nd command. + pssh " + if [ -d /snap/oracle-cloud-agent ]; then + sudo snap remove oracle-cloud-agent + sudo dpkg --remove --force-remove-reinstreq unified-monitoring-agent + fi" + # Copy settings and install Python YAML parser pssh -I tee /tmp/settings.yaml