]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/pg_autoscaler: do not index pool_root with pool_name
authorKefu Chai <kchai@redhat.com>
Mon, 28 Jun 2021 05:24:41 +0000 (13:24 +0800)
committerKamoltat <ksirivad@redhat.com>
Thu, 26 Aug 2021 19:56:44 +0000 (19:56 +0000)
pool_root is indexed by pool_id, and we never index it with pool_name.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 83f841295d86d10aadf3b4dff4e3eaa80fe139c3)

src/pybind/mgr/pg_autoscaler/module.py

index 0f35b22d211ecfdf3064e5da082a8e3eb5da9d12..2649f68e52e62209d5714064827c8954ad9840ac 100644 (file)
@@ -418,8 +418,6 @@ class PgAutoscaler(MgrModule):
             cr_name = crush_map.get_rule_by_id(p['crush_rule'])['rule_name']
             root_id = int(crush_map.get_rule_root(cr_name))
 
-            pool_root[pool_name] = root_id
-
             capacity = root_map[root_id].capacity
             if capacity == 0:
                 self.log.debug('skipping empty subtree %s', cr_name)