]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/pg_autoscaler: drop undefined variable 'cr_name'
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 8 Mar 2019 07:47:56 +0000 (15:47 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 8 Mar 2019 08:07:27 +0000 (16:07 +0800)
```
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 <xie.xingguo@zte.com.cn>
src/pybind/mgr/pg_autoscaler/module.py

index 7547979390a3b81c5fdae9f93e28c47b70763dac..e92377eb4bdbbb8e86e11b8128e55a2920389224 100644 (file)
@@ -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':