Add pool PGs count modification

Allows an administrator to adjust the PG count of a given pool. This can
be used to increase the PGs (for example after adding more OSDs) or
decrease it (to remove OSDs, reduce CPU load, etc.).
This commit is contained in:
2021-12-28 21:41:41 -05:00
parent bbfad340a1
commit 1142454934
6 changed files with 184 additions and 3 deletions

View File

@ -1434,6 +1434,22 @@ def ceph_pool_remove(zkhandler, name):
return output, retcode
@ZKConnection(config)
def ceph_pool_set_pgs(zkhandler, name, pgs):
"""
Set the PGs of a ceph RBD pool.
"""
retflag, retdata = pvc_ceph.set_pgs_pool(zkhandler, name, pgs)
if retflag:
retcode = 200
else:
retcode = 400
output = {"message": retdata.replace('"', "'")}
return output, retcode
@pvc_common.Profiler(config)
@ZKConnection(config)
def ceph_volume_list(zkhandler, pool=None, limit=None, is_fuzzy=True):