From: Patrick Donnelly Date: Fri, 27 Jul 2018 21:05:42 +0000 (-0700) Subject: ceph_volume_client: use integer division for pg_num X-Git-Tag: v14.0.1~700^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21948%2Fhead;p=ceph.git ceph_volume_client: use integer division for pg_num Otherwise a float is sent to the manager which is not the invalid format. Signed-off-by: Patrick Donnelly --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index c44dc0461b1..53675b066c9 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -549,14 +549,14 @@ class CephFSVolumeClient(object): # 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 + 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': pg_num + 'pg_num': int(pg_num), } )