From 33910303cb4940ca90cd76a5b4adb4de9c88d04c Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Fri, 27 Jul 2018 14:05:42 -0700 Subject: [PATCH] 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 --- src/pybind/ceph_volume_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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), } ) -- 2.39.5