From c3e24622a9a7374b6867670517f137a54c7d048f Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 21 Nov 2017 16:49:42 +0100 Subject: ssh_support: Disable automatic aptitude updates This adds 4 commands to disable aptitude trying to update automatically, since it was causing Rumba to fail since the automatic updates were taking the lock. --- rumba/ssh_support.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rumba/ssh_support.py b/rumba/ssh_support.py index 1a065c6..895a4e1 100644 --- a/rumba/ssh_support.py +++ b/rumba/ssh_support.py @@ -406,7 +406,11 @@ def aptitude_install(testbed, node, packages): package_install += package + " " package_install += "--yes" - cmds = [sudo("sh -c 'while fuser /var/lib/dpkg/lock > /dev/null 2>&1; " + + cmds = [sudo("systemctl disable apt-daily.service || true"), + sudo("systemctl disable apt-daily.timer || true"), + sudo("systemctl stop apt-daily.service || true"), + sudo("systemctl stop apt-daily.timer || true"), + sudo("sh -c 'while fuser /var/lib/dpkg/lock > /dev/null 2>&1; " + "do sleep 1; echo \"Waiting for dpkg...\"; done'"), sudo("apt-get update"), sudo(package_install)] -- cgit v1.2.3