]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-deploy: purge before archiving
authorSage Weil <sage@inktank.com>
Wed, 17 Apr 2013 03:50:50 +0000 (20:50 -0700)
committerSage Weil <sage@inktank.com>
Wed, 17 Apr 2013 03:51:21 +0000 (20:51 -0700)
Purge will uninstall and (in so doing) stop the daemons. This avoids trying
to tar up the mon data or logs while they are being written to, which
avoids errors like

2013-04-16T20:21:47.103 INFO:teuthology.task.ceph-deploy:Archiving mon data...
2013-04-16T20:21:47.545 INFO:teuthology.orchestra.run.err:tar: ./ceph-mira089/store.db/000009.log: file changed as we read it

Also drop the unnecessary uninstall (it is implied by purge).

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

index 2fc59c54c5ff6f4a89deadc07bac05100db3ca68..ed88cf4af65cb26bf696b34f369fcc006d5b5e65 100644 (file)
@@ -145,7 +145,6 @@ def build_ceph_cluster(ctx, config):
     install_nodes = './ceph-deploy install '+ceph_branch+" "+all_nodes
     purge_nodes = './ceph-deploy purge'+" "+all_nodes
     purgedata_nodes = './ceph-deploy purgedata'+" "+all_nodes
-    uninstall_nodes = './ceph-deploy uninstall'+" "+all_nodes
     mon_create_nodes = './ceph-deploy mon create'+" "+mon_nodes
     mon_hostname = mon_nodes.split(' ')[0]
     mon_hostname = str(mon_hostname)
@@ -246,6 +245,9 @@ def build_ceph_cluster(ctx, config):
         yield
 
     finally:
+        log.info('Purging package...')
+        execute_ceph_deploy(ctx, config, purge_nodes)
+
         if ctx.archive is not None:
             # archive mon data, too
             log.info('Archiving mon data...')
@@ -292,10 +294,8 @@ def build_ceph_cluster(ctx, config):
                 teuthology.pull_directory(remote, '/var/log/ceph',
                                           os.path.join(sub, 'log'))
 
-        log.info('Purging and Uninstalling ceph on test machines')
-        execute_ceph_deploy(ctx, config, purge_nodes)
+        log.info('Purging data on test machines')
         execute_ceph_deploy(ctx, config, purgedata_nodes)
-        execute_ceph_deploy(ctx, config, uninstall_nodes)
 
 @contextlib.contextmanager
 def task(ctx, config):