From: Dan Mick Date: Tue, 26 Jan 2016 02:05:18 +0000 (-0800) Subject: nuke.py: try to undo multipath devices X-Git-Tag: 1.1.0~685^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2daa8deda6394ab0f6b0454ba07c371fad842004;p=teuthology.git nuke.py: try to undo multipath devices Use multipath -F, and remove multipath-tools and/or device-mapper-multipath. Fixes: #14460 Signed-off-by: Dan Mick --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 9b3791cc2..f388ee950 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -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...')