]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke.py: try to undo multipath devices
authorDan Mick <dan.mick@redhat.com>
Tue, 26 Jan 2016 02:05:18 +0000 (18:05 -0800)
committerDan Mick <dan.mick@redhat.com>
Wed, 27 Jan 2016 20:59:35 +0000 (12:59 -0800)
Use multipath -F, and remove multipath-tools and/or
device-mapper-multipath.

Fixes: #14460
Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/nuke.py

index 9b3791cc2f6430e12eb59d49498c0d61e0b4fda7..f388ee95041abd844090fce852a2cb3f678ae9ce 100644 (file)
@@ -346,6 +346,29 @@ def remove_configuration_files(ctx):
         proc.wait()
 
 
+def undo_multipath(ctx):
+    """
+    Undo any multipath device mappings created, an
+    remove the packages/daemon that manages them so they don't
+    come back unless specifically requested by the test.
+    """
+    for remote in ctx.cluster.remotes.iterkeys():
+        remote.run(
+            args=[
+                'sudo', 'multipath', '-F',
+            ],
+            check_status=False,
+        )
+        install_task.remove_packages(
+            ctx,
+            dict(),     # task config not relevant here
+            {
+                "rpm": ['multipath-tools', 'device-mapper-multipath'],
+                "deb": ['multipath-tools'],
+            }
+        )
+
+
 def synch_clocks(remotes):
     nodes = {}
     for remote in remotes:
@@ -701,6 +724,8 @@ def nuke_helper(ctx, should_unlock):
                           '/lib/firmware/updates/.git/index.lock', ])
 
     remove_configuration_files(ctx)
+    log.info('Removing any multipath config/pkgs...')
+    undo_multipath(ctx)
     log.info('Reseting syslog output locations...')
     reset_syslog_dir(ctx)
     log.info('Clearing filesystem of test data...')