From: Dan Mick Date: Tue, 28 Jul 2015 23:09:55 +0000 (-0700) Subject: calamari_setup: only stop ceph on osd/mon machines X-Git-Tag: v10.2.6~165^2^2~424^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6726f4f1fa0a4e81c206cc4b991e80ce37b68614;p=ceph.git calamari_setup: only stop ceph on osd/mon machines Fixes bogus failure at end of run on calamari server Signed-off-by: Dan Mick --- diff --git a/tasks/calamari_setup.py b/tasks/calamari_setup.py index c893dc74b984..fd3ef4e39599 100644 --- a/tasks/calamari_setup.py +++ b/tasks/calamari_setup.py @@ -409,9 +409,16 @@ def undeploy_ceph(ctx, cal_svr): all_machines = [] ret = True for remote in ctx.cluster.remotes: - ret &= remote.run(args=['sudo', 'stop', 'ceph-all', run.Raw('||'), - 'sudo', 'service', 'ceph', 'stop'] - ).exitstatus + roles = ctx.cluster.remotes[remote] + if ( + not any('osd' in role for role in roles) and + not any('mon' in role for role in roles) + ): + continue + ret &= remote.run( + args=['sudo', 'stop', 'ceph-all', run.Raw('||'), + 'sudo', 'service', 'ceph', 'stop'] + ).exitstatus all_machines.append(remote.shortname) all_machines = set(all_machines) cmd1 = ['ceph-deploy', 'uninstall']