]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
calamari_setup: only stop ceph on osd/mon machines
authorDan Mick <dan.mick@redhat.com>
Tue, 28 Jul 2015 23:09:55 +0000 (16:09 -0700)
committerDan Mick <dan.mick@redhat.com>
Tue, 28 Jul 2015 23:12:09 +0000 (16:12 -0700)
Fixes bogus failure at end of run on calamari server

Signed-off-by: Dan Mick <dan.mick@redhat.com>
tasks/calamari_setup.py

index c893dc74b984e3ebcd1187f29585b5ee6f5e8d6f..fd3ef4e39599544f4957ee73a10709be90e47680 100644 (file)
@@ -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']