Skip to content

Commit

Permalink
Merge pull request #16137 from smithfarm/wip-20024-kraken
Browse files Browse the repository at this point in the history
kraken: tests: HEALTH_WARN pool rbd pg_num 244 > pgp_num 224 during upgrade

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
smithfarm committed Jul 31, 2017
2 parents 16ca3c7 + 533ff8a commit 72e5d61
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions qa/tasks/ceph_manager.py
Expand Up @@ -529,8 +529,11 @@ def fix_pgp_num(self, pool=None):
"""
if pool is None:
pool = self.ceph_manager.get_pool()
force = False
else:
force = True
self.log("fixing pg num pool %s" % (pool,))
if self.ceph_manager.set_pool_pgpnum(pool):
if self.ceph_manager.set_pool_pgpnum(pool, force):
self.pools_to_fix_pgp_num.discard(pool)

def test_pool_min_size(self):
Expand Down Expand Up @@ -1517,14 +1520,14 @@ def expand_pool(self, pool_name, by, max_pgs):
self.pools[pool_name] = new_pg_num
return True

def set_pool_pgpnum(self, pool_name):
def set_pool_pgpnum(self, pool_name, force):
"""
Set pgpnum property of pool_name pool.
"""
with self.lock:
assert isinstance(pool_name, basestring)
assert pool_name in self.pools
if self.get_num_creating() > 0:
if not force and self.get_num_creating() > 0:
return False
self.set_pool_property(pool_name, 'pgp_num', self.pools[pool_name])
return True
Expand Down

0 comments on commit 72e5d61

Please sign in to comment.