mirror of
https://github.com/ceph/ceph
synced 2024-12-17 00:46:05 +00:00
ceph-deploy: purge before archiving
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>
This commit is contained in:
parent
90e2a2ef02
commit
4befae4fbe
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user