]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph_volume: add container support for batch
authorSébastien Han <seb@redhat.com>
Fri, 26 Oct 2018 14:30:32 +0000 (16:30 +0200)
committerSébastien Han <seb@redhat.com>
Mon, 29 Oct 2018 17:31:17 +0000 (18:31 +0100)
https://tracker.ceph.com/issues/36363 has been resolved and the patch
has been backported to luminous and mimic so let's enable the container
support.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1541415
Signed-off-by: Sébastien Han <seb@redhat.com>
library/ceph_volume.py
library/test_ceph_volume.py

index b07c1d43b4c5662032ef40a657947b23ae9e413f..8c4c59c2ea64c252c974916ebbfc8adee76ed2ca 100644 (file)
@@ -288,6 +288,9 @@ def batch(module, container_image):
     cmd.extend(['--%s' % objectstore])
     cmd.append('--yes')
 
+    if container_image:
+        cmd.append('--prepare')
+
     if crush_device_class:
         cmd.extend(['--crush-device-class', crush_device_class])
 
@@ -556,10 +559,6 @@ def run_module():
 
     elif action == 'batch':
         # Batch prepare AND activate OSDs
-        if container_image:
-            fatal(
-                'Batch operation is currently not supported on containerized deployment (https://tracker.ceph.com/issues/36363)', module)  # noqa E501
-
         report = module.params.get('report', None)
 
         # Add --report flag for the idempotency test
index d0cee813f97cd3a28fec9192d1da5ee578c94a26..87314c7b1fe91cb7e7f991e5aa200401a8dbda77 100644 (file)
@@ -243,6 +243,7 @@ class TestCephVolumeModule(object):
                                  'batch',
                                  '--filestore',
                                  '--yes',
+                                 '--prepare',
                                  '--journal-size',
                                  '100',
                                  '/dev/sda',