aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-11-21 16:49:42 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-11-21 16:49:42 +0100
commitc3e24622a9a7374b6867670517f137a54c7d048f (patch)
tree0a753c38ded74cb8dca8ed7dfc43098629da4b44
parent38e25070ab5e5b74917797f9049dd226afeb9728 (diff)
downloadrumba-c3e24622a9a7374b6867670517f137a54c7d048f.tar.gz
rumba-c3e24622a9a7374b6867670517f137a54c7d048f.zip
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.
-rw-r--r--rumba/ssh_support.py6
1 files changed, 5 insertions, 1 deletions
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)]