]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: fix broken ceph.restart marking of OSDs down 31040/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 22 Aug 2019 04:13:37 +0000 (21:13 -0700)
committerNathan Cutler <ncutler@suse.com>
Mon, 21 Oct 2019 22:11:40 +0000 (00:11 +0200)
Sage noticed `osd down` was not being performed. Bug was that the role
format had changed so splitting no longer worked correctly.

Fixes: https://tracker.ceph.com/issues/40773
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 73c7d14eab03b60d425822fe04180f4002e8182e)

qa/tasks/ceph.py

index 7f0976536959d107a81e5b2f7649e8535b6c169d..bfc145635c8bd3d980cab11bb2a389e4bdd40afb 100644 (file)
@@ -1625,14 +1625,10 @@ def restart(ctx, config):
             ctx.daemons.get_daemon(type_, id_, cluster).restart()
             clusters.add(cluster)
     
-    for cluster in clusters:
-        manager = ctx.managers[cluster]
-        for dmon in daemons:
-            if '.' in dmon:
-                dm_parts = dmon.split('.')
-                if dm_parts[1].isdigit():
-                    if dm_parts[0] == 'osd':
-                        manager.mark_down_osd(int(dm_parts[1]))
+    for role in daemons:
+        cluster, type_, id_ = teuthology.split_role(role)
+        if type_ == 'osd':
+            ctx.managers[cluster].mark_down_osd(id_)
 
     if config.get('wait-for-healthy', True):
         for cluster in clusters: