aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2017-11-15 00:14:31 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-11-15 09:39:16 +0000
commita10232a5bd0db41733d0d8562e2fe56008f01cec (patch)
tree05773b3943ed6c88799d96335dbae62262c12a70
parent8838f6dcfedd87c35e6325f501a17175bd410e3b (diff)
downloadrumba-a10232a5bd0db41733d0d8562e2fe56008f01cec.tar.gz
rumba-a10232a5bd0db41733d0d8562e2fe56008f01cec.zip
prototypes: Wait before IRATI install
This adds a command that waits for any running package managers before attempting to update apt. This avoids bailing from some exogeni virtual machines, which seem to perform some package management in the background at boot.
-rw-r--r--rumba/prototypes/irati.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/rumba/prototypes/irati.py b/rumba/prototypes/irati.py
index 72d4b4e..32b1353 100644
--- a/rumba/prototypes/irati.py
+++ b/rumba/prototypes/irati.py
@@ -81,7 +81,9 @@ class Experiment(mod.Experiment):
def install(self):
"""Installs IRATI on the nodes."""
- cmds = [self.sudo("apt-get update"),
+ cmds = [self.sudo("while fuser /var/lib/dpkg/lock > /dev/null 2>&1 " +
+ "do sleep 1; echo \"Waiting for dpkg...\"; done"),
+ self.sudo("apt-get update"),
self.sudo("apt-get install g++ gcc libtool "
"linux-headers-$(uname -r) autoconf automake "
"protobuf-compiler libprotobuf-dev "