]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_volume_client: use integer division for pg_num 24083/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 27 Jul 2018 21:05:42 +0000 (14:05 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 27 Sep 2018 23:25:18 +0000 (16:25 -0700)
Otherwise a float is sent to the manager which is not the invalid format.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 33910303cb4940ca90cd76a5b4adb4de9c88d04c)

src/pybind/ceph_volume_client.py

index 19805e8ae8213c2011536e77ee9a8bf05fe1a7b3..a78b583a433896eb69077a05138802dbd07f13e2 100644 (file)
@@ -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),
             }
         )