From: Sage Weil Date: Thu, 19 Sep 2019 15:47:24 +0000 (-0500) Subject: pybind/ceph_volume_client: do not specify pg_num for new pools X-Git-Tag: v15.1.0~1455^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b1b821f60812dd36e61be115c5ad8223ab51befe;p=ceph-ci.git pybind/ceph_volume_client: do not specify pg_num for new pools Signed-off-by: Sage Weil --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index cfd54a5d172..68bdc514159 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -563,31 +563,10 @@ class CephFSVolumeClient(object): log.info("Pool {0} already exists".format(pool_name)) return existing_id - osd_count = len(osd_map['osds']) - - # We can't query the actual cluster config remotely, but since this is - # just a heuristic we'll assume that the ceph.conf we have locally reflects - # that in use in the rest of the cluster. - pg_warn_max_per_osd = int(self.rados.conf_get('mon_max_pg_per_osd')) - - other_pgs = 0 - for pool in osd_map['pools']: - if not pool['pool_name'].startswith(self.POOL_PREFIX): - other_pgs += pool['pg_num'] - - # A basic heuristic for picking pg_num: work out the max number of - # PGs we can have without tripping a warning, then subtract the number - # of PGs already created by non-manila pools, then divide by ten. That'll - # give you a reasonable result on a system where you have "a few" manila - # shares. - pg_num = ((pg_warn_max_per_osd * osd_count) - other_pgs) // 10 - # TODO Alternatively, respect an override set by the user. - self._rados_command( 'osd pool create', { 'pool': pool_name, - 'pg_num': int(pg_num), } )