From: Zack Cerza Date: Tue, 27 Sep 2016 23:02:02 +0000 (-0600) Subject: nuke: remove ceph data later X-Git-Tag: 1.1.0~524^2~3 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fdfaf0d03867d53117ffbce55c8a358e11037e64;p=teuthology.git nuke: remove ceph data later Signed-off-by: Zack Cerza --- diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index ef2c53272d..ab33558639 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -27,7 +27,8 @@ from .actions import ( reboot, remove_osd_mounts, remove_osd_tmpfs, kill_hadoop, remove_kernel_mounts, remove_ceph_packages, synch_clocks, remove_configuration_files, undo_multipath, reset_syslog_dir, - remove_testing_tree, remove_yum_timedhosts, kill_valgrind, + remove_ceph_data, remove_testing_tree, remove_yum_timedhosts, + kill_valgrind, ) log = logging.getLogger(__name__) @@ -359,7 +360,7 @@ def nuke_helper(ctx, should_unlock): undo_multipath(ctx) log.info('Resetting syslog output locations...') reset_syslog_dir(ctx) - log.info('Clearing filesystem of test data...') + remove_ceph_data(ctx) remove_testing_tree(ctx) log.info('Filesystem cleared.') remove_yum_timedhosts(ctx) diff --git a/teuthology/nuke/actions.py b/teuthology/nuke/actions.py index f6d6d1e2ef..e467aacb60 100644 --- a/teuthology/nuke/actions.py +++ b/teuthology/nuke/actions.py @@ -304,22 +304,30 @@ def remove_installed_packages(ctx): ) ) install_task.remove_sources(ctx, conf) + + +def remove_ceph_data(ctx): + log.info("Removing ceph data...") + ctx.cluster.run( + args=[ + 'sudo', 'rm', '-rf', '/etc/ceph', + ], + ) install_task.purge_data(ctx) def remove_testing_tree(ctx): + log.info('Clearing filesystem of test data...') ctx.cluster.run( - args=[ - 'sudo', 'rm', '-rf', get_testdir(ctx), - # just for old time's sake - run.Raw('&&'), - 'sudo', 'rm', '-rf', '/tmp/cephtest', - run.Raw('&&'), - 'sudo', 'rm', '-rf', '/home/ubuntu/cephtest', - run.Raw('&&'), - 'sudo', 'rm', '-rf', '/etc/ceph', - ], - ) + args=[ + 'sudo', 'rm', '-rf', get_testdir(ctx), + # just for old time's sake + run.Raw('&&'), + 'sudo', 'rm', '-rf', '/tmp/cephtest', + run.Raw('&&'), + 'sudo', 'rm', '-rf', '/home/ubuntu/cephtest', + ], + ) def remove_configuration_files(ctx):