]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
nuke: dpkg --configure -a and apt-get -f install
authorSage Weil <sage@inktank.com>
Sat, 16 Feb 2013 00:58:40 +0000 (16:58 -0800)
committerSage Weil <sage@inktank.com>
Mon, 18 Feb 2013 21:39:04 +0000 (13:39 -0800)
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 <sage@inktank.com>
teuthology/nuke.py

index 6746a1dfa1cee07071138de9a504b575851f2aba..258b8578b26536b856f67d621797d4c162793e0c 100644 (file)
@@ -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',