mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
Merge pull request #38206 from dvanders/dvanders_upmap
mgr/balancer: fix available pgs sent to calc_pg_upmaps Reviewed-by: David Zafman <dzafman@redhat.com>
This commit is contained in:
commit
a1cbe293c0
@ -1005,10 +1005,8 @@ class Module(MgrModule):
|
||||
random.shuffle(adjusted_pools)
|
||||
pool_dump = osdmap_dump.get('pools', [])
|
||||
for pool in adjusted_pools:
|
||||
num_pg = 0
|
||||
for p in pool_dump:
|
||||
if p['pool_name'] == pool:
|
||||
num_pg = p['pg_num']
|
||||
pool_id = p['pool']
|
||||
break
|
||||
|
||||
@ -1023,7 +1021,7 @@ class Module(MgrModule):
|
||||
if s['state_name'] == 'active+clean':
|
||||
num_pg_active_clean += s['count']
|
||||
break
|
||||
available = left - (num_pg - num_pg_active_clean)
|
||||
available = min(left, num_pg_active_clean)
|
||||
did = plan.osdmap.calc_pg_upmaps(inc, max_deviation, available, [pool])
|
||||
total_did += did
|
||||
left -= did
|
||||
|
Loading…
Reference in New Issue
Block a user