]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-deploy: stop daemons, archive, then purge[data]
authorSage Weil <sage@inktank.com>
Thu, 18 Apr 2013 15:06:52 +0000 (08:06 -0700)
committerSage Weil <sage@inktank.com>
Thu, 18 Apr 2013 17:15:44 +0000 (10:15 -0700)
Purge removes logs, and we want to archive those, so explicitly shut down
all daemons before doing the archiving step.

Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/task/ceph-deploy.py

index ed88cf4af65cb26bf696b34f369fcc006d5b5e65..611b270f99bb41dbf96171a86bf67d1f232804aa 100644 (file)
@@ -245,8 +245,12 @@ def build_ceph_cluster(ctx, config):
         yield
 
     finally:
-        log.info('Purging package...')
-        execute_ceph_deploy(ctx, config, purge_nodes)
+        log.info('Stopping ceph...')
+        ctx.cluster.run(args=[
+                'sudo', 'stop', 'ceph',
+                run.Raw('||'),
+                'sudo', 'service', 'ceph', 'stop'
+                ])
 
         if ctx.archive is not None:
             # archive mon data, too
@@ -294,7 +298,9 @@ def build_ceph_cluster(ctx, config):
                 teuthology.pull_directory(remote, '/var/log/ceph',
                                           os.path.join(sub, 'log'))
 
-        log.info('Purging data on test machines')
+        log.info('Purging package...')
+        execute_ceph_deploy(ctx, config, purge_nodes)
+        log.info('Purging data...')
         execute_ceph_deploy(ctx, config, purgedata_nodes)
 
 @contextlib.contextmanager