From 4295b75f628c9437b946f12d452d1e205be2f420 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Fri, 8 Mar 2019 15:47:56 +0800 Subject: [PATCH] mgr/pg_autoscaler: drop undefined variable 'cr_name' ``` a/pg_autoscaler/module.py:359: error: Name 'cr_name' is not defined ``` Actually _get_pool_status should have prevented any pool with a zero-ed capacity from going this far, so it is safe to simply drop the obviously redundant check here. Signed-off-by: xie xingguo --- src/pybind/mgr/pg_autoscaler/module.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 7547979390a3b..e92377eb4bdbb 100644 --- a/src/pybind/mgr/pg_autoscaler/module.py +++ b/src/pybind/mgr/pg_autoscaler/module.py @@ -355,9 +355,6 @@ class PgAutoscaler(MgrModule): if p['target_bytes'] > 0: total_target_bytes[p['crush_root_id']] += p['target_bytes'] * p['raw_used_rate'] target_bytes_pools[p['crush_root_id']].append(p['pool_name']) - if p['subtree_capacity'] == 0: - self.log.debug('skipping empty subtree %s', cr_name) - continue if not p['would_adjust']: continue if p['pg_autoscale_mode'] == 'warn': -- 2.39.5