]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Bug #10803: Try apt-get -f install to workaround nuke failure. 441/head
authorSandon Van Ness <sandon@redhat.com>
Fri, 13 Feb 2015 18:46:05 +0000 (10:46 -0800)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 3 Mar 2015 21:44:38 +0000 (15:44 -0600)
Sometimes packages or dpkg gets in a weird state where a nuke will
fail to run and simply running an apt-get -f install on the
machine will fix things up so it can be nuked again. Currently
we only ran that being dependent on dpkg --configure completing
where as I changed it so it will still try apt-get -f install
to potentially require less manual intervention when cleaning up
machines. I kept the original behavior but adding some arguments
to insure it will not prompt you for a yes/no (like apt-get -f
install usually would do).

Signed-off-by: Sandon Van Ness <sandon@redhat.com>
teuthology/nuke.py

index 767ce476b990dfb66334fe0689d56f60f6806f26..2d785b6853b7d116f9c89a8b8855aa82ca7bb505 100644 (file)
@@ -245,8 +245,9 @@ def dpkg_configure(ctx):
         proc = remote.run(
             args=[
                 'sudo', 'dpkg', '--configure', '-a',
-                run.Raw('&&'),
-                'sudo', 'apt-get', '-f', 'install',
+                run.Raw(';'),
+                'sudo', 'DEBIAN_FRONTEND=noninteractive',
+                'apt-get', '-y', '--force-yes', '-f', 'install',
                 run.Raw('||'),
                 ':',
             ],