]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke: remove ceph data later
authorZack Cerza <zack@redhat.com>
Tue, 27 Sep 2016 23:02:02 +0000 (17:02 -0600)
committerZack Cerza <zack@redhat.com>
Mon, 3 Oct 2016 16:17:10 +0000 (10:17 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/nuke/__init__.py
teuthology/nuke/actions.py

index ef2c53272d0be57aa0bc2bae66a67d316c12d43e..ab335586391ead7ccfca8f769227979675ac064a 100644 (file)
@@ -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)
index f6d6d1e2efb9901902948f14717b920cf075c8d5..e467aacb604ef65360a6e858136c31651b2d88d4 100644 (file)
@@ -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):