From: Alfredo Deza Date: Wed, 5 Nov 2014 14:37:59 +0000 (-0500) Subject: create a configuration removal function in nuke.py X-Git-Tag: 1.1.0~1077^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=837790f7358097dd28e711e560cf3293f406629d;p=teuthology.git create a configuration removal function in nuke.py Signed-off-by: Alfredo Deza --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 2b14a0d9c7..8fb9485617 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -90,6 +90,7 @@ def kill_hadoop(ctx): log.info("Killing PID {0} ({1})".format(pid, cmdline)) remote.run(args=["kill", "-9", pid], check_status=False) + def find_kernel_mounts(ctx): nodes = {} log.info('Looking for kernel mounts to handle...') @@ -283,6 +284,32 @@ def remove_testing_tree(ctx): proc.wait() +def remove_configuration_files(remotes): + """ + Goes through a list of commonly used configuration files used for testing + that should not be left behind. + + For example, sometimes ceph-deploy may be configured via + ``~/.cephdeploy.conf`` to alter how it handles installation by specifying + a default section in its config with custom locations. + """ + + nodes = {} + + for remote in remotes: + proc = remote.run( + args=[ + 'rm', '-f', '/home/ubuntu/.cephdeploy.conf' + ], + wait=False, + ) + nodes[remote.name] = proc + + for name, proc in nodes.iteritems(): + log.info('removing temporary configuration files on %s', name) + proc.wait() + + def synch_clocks(remotes): nodes = {} for remote in remotes: