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: v12.2.9~55^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=10fc7ae467b5efad0c311d63ec76a7c73ad85f41;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 (cherry picked from commit 33910303cb4940ca90cd76a5b4adb4de9c88d04c) --- diff --git a/src/pybind/ceph_volume_client.py b/src/pybind/ceph_volume_client.py index 19805e8ae82..a78b583a433 100644 --- a/src/pybind/ceph_volume_client.py +++ b/src/pybind/ceph_volume_client.py @@ -546,14 +546,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), } )