Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: tests: HEALTH_WARN pool rbd pg_num 244 > pgp_num 224 during upgrade #16137

Merged
merged 1 commit into from
Jul 31, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions qa/tasks/ceph_manager.py
Original file line number Diff line number Diff line change
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