From a10232a5bd0db41733d0d8562e2fe56008f01cec Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Wed, 15 Nov 2017 00:14:31 +0100 Subject: 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. --- rumba/prototypes/irati.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rumba') 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 " -- cgit v1.2.3