]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/balancer: note root id in Eval
authorSage Weil <sage@redhat.com>
Tue, 26 Sep 2017 22:35:42 +0000 (18:35 -0400)
committerSage Weil <sage@redhat.com>
Thu, 2 Nov 2017 19:56:38 +0000 (14:56 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 26a7ec0c8a4c215791369d8650cd17d41317aefe)

src/pybind/mgr/balancer/module.py

index 8d8d6a74810bed88bd023a3a8898c4e45a71a78a..612fe6b4a60afc95a0150f3082f1439374c254c7 100644 (file)
@@ -80,6 +80,7 @@ class Plan:
 
 
 class Eval:
+    root_ids = {}        # root name -> id
     pool_name = {}       # pool id -> pool name
     pool_id = {}         # pool name -> id
     pool_roots = {}      # pool name -> root name
@@ -356,6 +357,7 @@ class Module(MgrModule):
         roots = []
         for rootid in rootids:
             root = ms.crush.get_item_name(rootid)
+            pe.root_ids[root] = rootid
             roots.append(root)
             ls = ms.osdmap.get_pools_by_take(rootid)
             pe.root_pools[root] = []