]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw: rgw/verify suite randomizes --placement-inline-data 49390/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 12 Dec 2022 17:32:21 +0000 (12:32 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 12 Dec 2022 17:32:24 +0000 (12:32 -0500)
test coverage for https://github.com/ceph/ceph/pull/48711

Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/suites/rgw/verify/inline-data$/off.yaml [new file with mode: 0644]
qa/suites/rgw/verify/inline-data$/on.yaml [new file with mode: 0644]
qa/tasks/rgw.py

diff --git a/qa/suites/rgw/verify/inline-data$/off.yaml b/qa/suites/rgw/verify/inline-data$/off.yaml
new file mode 100644 (file)
index 0000000..56d1bce
--- /dev/null
@@ -0,0 +1,3 @@
+overrides:
+  rgw:
+    inline data: false
diff --git a/qa/suites/rgw/verify/inline-data$/on.yaml b/qa/suites/rgw/verify/inline-data$/on.yaml
new file mode 100644 (file)
index 0000000..e69de29
index a10266d050e28f8652397304f199a8b61ed75ac7..61bcea3a5e2e5db78a99a88282eab84b977ef6fc 100644 (file)
@@ -314,6 +314,20 @@ def configure_compression(ctx, clients, compression):
                 check_status=True)
     yield
 
+@contextlib.contextmanager
+def disable_inline_data(ctx, clients):
+    for client in clients:
+        # XXX: the 'default' zone and zonegroup aren't created until we run RGWRados::init_complete().
+        # issue a 'radosgw-admin user list' command to trigger this
+        rgwadmin(ctx, client, cmd=['user', 'list'], check_status=True)
+
+        rgwadmin(ctx, client,
+                cmd=['zone', 'placement', 'modify', '--rgw-zone', 'default',
+                     '--placement-id', 'default-placement',
+                     '--placement-inline-data', 'false'],
+                check_status=True)
+    yield
+
 @contextlib.contextmanager
 def configure_datacache(ctx, clients, datacache_path):
     """ create directory for rgw datacache """
@@ -414,6 +428,7 @@ def task(ctx, config):
     ctx.rgw.cache_pools = bool(config.pop('cache-pools', False))
     ctx.rgw.frontend = config.pop('frontend', 'beast')
     ctx.rgw.compression_type = config.pop('compression type', None)
+    ctx.rgw.inline_data = config.pop('inline data', True)
     ctx.rgw.storage_classes = config.pop('storage classes', None)
     default_cert = config.pop('ssl certificate', None)
     ctx.rgw.data_pool_pg_size = config.pop('data_pool_pg_size', 64)
@@ -435,6 +450,10 @@ def task(ctx, config):
             lambda: configure_compression(ctx=ctx, clients=clients,
                                           compression=ctx.rgw.compression_type),
         ])
+    if not ctx.rgw.inline_data:
+        subtasks.extend([
+            lambda: disable_inline_data(ctx=ctx, clients=clients),
+        ])
     if ctx.rgw.datacache:
         subtasks.extend([
             lambda: configure_datacache(ctx=ctx, clients=clients,