From 149be93639d1009f0608695fc6477343e80d5df1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Feb 2013 16:58:40 -0800 Subject: [PATCH] nuke: dpkg --configure -a and apt-get -f install Installing debs means we are more likely to hit a case where we interrupt apt/dpkg. Try to mop up as best we can in nuke. Signed-off-by: Sage Weil --- teuthology/nuke.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 6746a1dfa1cee..258b8578b2653 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -225,9 +225,28 @@ def reset_syslog_dir(ctx, log): log.info('Waiting for %s to restart syslog...', name) proc.exitstatus.get() +def dpkg_configure(ctx, log): + from .orchestra import run + nodes = {} + for remote in ctx.cluster.remotes.iterkeys(): + proc = remote.run( + args=[ + 'sudo', 'dpkg', '--configure', '-a', + run.Raw('&&'), + 'sudo', 'apt-get', '-f', 'install', + ], + wait=False, + ) + nodes[remote.name] = proc + + for name, proc in nodes.iteritems(): + log.info('Waiting for %s to dpkg --configure -a and apt-get -f install...', name) + proc.exitstatus.get() + def remove_installed_packages(ctx, log): from teuthology.task import ceph as ceph_task + dpkg_configure(ctx, log) debs = ['ceph', 'ceph-test', 'ceph-fuse', -- 2.39.5