]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-volume: fix TypeError exception when setting osds-per-device > 1
authorMaciej Naruszewicz <maciej.naruszewicz@intel.com>
Fri, 19 Oct 2018 20:40:36 +0000 (22:40 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 29 Oct 2018 20:56:37 +0000 (21:56 +0100)
osds-per-device needs to be passed to run_command as a string.
Otherwise, expandvars method will try to iterate over an integer.

Signed-off-by: Maciej Naruszewicz <maciej.naruszewicz@intel.com>
library/ceph_volume.py

index 8c4c59c2ea64c252c974916ebbfc8adee76ed2ca..43b3eebf7f3d28ef17b43c1ef1d3fdeb365a2320 100644 (file)
@@ -298,7 +298,7 @@ def batch(module, container_image):
         cmd.append('--dmcrypt')
 
     if osds_per_device > 1:
-        cmd.extend(['--osds-per-device', osds_per_device])
+        cmd.extend(['--osds-per-device', str(osds_per_device)])
 
     if objectstore == 'filestore':
         cmd.extend(['--journal-size', journal_size])