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

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/pybind/ceph_volume_client.py

index c44dc0461b1e9a82a6602c2a995d93be1d04d7ea..53675b066c9028b4ac865cba95131aeb934348ff 100644 (file)
@@ -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),
             }
         )