]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/ceph2: fix osd ordering
authorSage Weil <sage@redhat.com>
Tue, 12 Nov 2019 01:22:57 +0000 (01:22 +0000)
committerSage Weil <sage@redhat.com>
Thu, 21 Nov 2019 16:46:54 +0000 (10:46 -0600)
Sort by the numeric key

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph2.py

index 6edf3e5e10aba665f14ffdc5d2737a044ce0d812..974bdf866ef05c1b21634118287849141730c030 100644 (file)
@@ -476,7 +476,7 @@ def ceph_osds(ctx, config):
     try:
         log.info('Deploying OSDs...')
 
-        # provision OSDs in order
+        # provision OSDs in numeric order
         id_to_remote = {}
         devs_by_remote = {}
         for remote, roles in ctx.cluster.remotes.items():
@@ -484,11 +484,11 @@ def ceph_osds(ctx, config):
             for osd in [r for r in roles
                         if teuthology.is_type('osd', cluster_name)(r)]:
                 _, _, id_ = teuthology.split_role(osd)
-                id_to_remote[id_] = (osd, remote)
+                id_to_remote[int(id_)] = (osd, remote)
 
         cur = 0
-        for osd_id, t in id_to_remote.items():
-            osd, remote = t
+        for osd_id in sorted(id_to_remote.keys()):
+            osd, remote = id_to_remote[osd_id]
             _, _, id_ = teuthology.split_role(osd)
             assert int(id_) == cur
             devs = devs_by_remote[remote]