From: xie xingguo Date: Fri, 8 Mar 2019 07:47:56 +0000 (+0800) Subject: mgr/pg_autoscaler: drop undefined variable 'cr_name' X-Git-Tag: v14.1.1~12^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4295b75f628c9437b946f12d452d1e205be2f420;p=ceph.git 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 --- diff --git a/src/pybind/mgr/pg_autoscaler/module.py b/src/pybind/mgr/pg_autoscaler/module.py index 7547979390a3..e92377eb4bdb 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':