From 2daa8deda6394ab0f6b0454ba07c371fad842004 Mon Sep 17 00:00:00 2001 From: Dan Mick Date: Mon, 25 Jan 2016 18:05:18 -0800 Subject: [PATCH] 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 --- teuthology/nuke.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 9b3791cc2f..f388ee9504 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...') -- 2.39.5