]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/qa: Run s3tests on dbstore backend in teuthology 45985/head
authorSoumya Koduri <skoduri@redhat.com>
Thu, 5 May 2022 18:33:56 +0000 (00:03 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Sat, 21 May 2022 18:19:47 +0000 (23:49 +0530)
Add a new test-suite to run s3tests on dbstore backend.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
qa/suites/rgw/dbstore/+ [new file with mode: 0644]
qa/suites/rgw/dbstore/.qa [new symlink]
qa/suites/rgw/dbstore/cluster.yaml [new file with mode: 0644]
qa/suites/rgw/dbstore/overrides.yaml [new file with mode: 0644]
qa/suites/rgw/dbstore/supported-random-distro$ [new symlink]
qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml [new file with mode: 0644]
qa/tasks/s3tests.py

diff --git a/qa/suites/rgw/dbstore/+ b/qa/suites/rgw/dbstore/+
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rgw/dbstore/.qa b/qa/suites/rgw/dbstore/.qa
new file mode 120000 (symlink)
index 0000000..fea2489
--- /dev/null
@@ -0,0 +1 @@
+../.qa
\ No newline at end of file
diff --git a/qa/suites/rgw/dbstore/cluster.yaml b/qa/suites/rgw/dbstore/cluster.yaml
new file mode 100644 (file)
index 0000000..496b51b
--- /dev/null
@@ -0,0 +1,3 @@
+roles:
+- [mon.a, osd.0, osd.1, osd.2, mgr.0, client.0]
+
diff --git a/qa/suites/rgw/dbstore/overrides.yaml b/qa/suites/rgw/dbstore/overrides.yaml
new file mode 100644 (file)
index 0000000..df4aaa9
--- /dev/null
@@ -0,0 +1,11 @@
+overrides:
+  ceph:
+    conf:
+      client:
+        setuser: ceph
+        setgroup: ceph
+        debug rgw: 20
+        rgw crypt require ssl: false
+        rgw backend store: dbstore
+  rgw:
+    frontend: beast
diff --git a/qa/suites/rgw/dbstore/supported-random-distro$ b/qa/suites/rgw/dbstore/supported-random-distro$
new file mode 120000 (symlink)
index 0000000..0862b44
--- /dev/null
@@ -0,0 +1 @@
+.qa/distros/supported-random-distro$
\ No newline at end of file
diff --git a/qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml b/qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml
new file mode 100644 (file)
index 0000000..2042f83
--- /dev/null
@@ -0,0 +1,15 @@
+tasks:
+- install:
+- ceph:
+- rgw: [client.0]
+- exec:
+    client.0:
+      - sudo chmod 0777 /var/run/ceph
+      - sudo chmod 0777 /var/run/ceph/dbstore-default_ns.db
+- s3tests:
+    client.0:
+      force-branch: ceph-master
+      dbstore_tests: True
+      rgw_server: client.0
+      extra_attrs: ["!fails_on_rgw,!fails_on_dbstore"]
+
index 626ede224b4ee4ac85767cfdcc31c6259ad376f5..09e4defc2cd577a7e3b317161c5566247a9f9c27 100644 (file)
@@ -183,23 +183,24 @@ def create_users(ctx, config):
                             '--cluster', cluster_name,
                         ],
                     )
-                    ctx.cluster.only(client).run(
-                        args=[
-                            'adjust-ulimits',
-                            'ceph-coverage',
-                            '{tdir}/archive/coverage'.format(tdir=testdir),
-                            'radosgw-admin',
-                            '-n', client_with_id,
-                            'mfa', 'create',
-                            '--uid', s3tests_conf[section]['user_id'],
-                            '--totp-serial', s3tests_conf[section]['totp_serial'],
-                            '--totp-seed', s3tests_conf[section]['totp_seed'],
-                            '--totp-seconds', s3tests_conf[section]['totp_seconds'],
-                            '--totp-window', '8',
-                            '--totp-seed-type', 'base32',
-                            '--cluster', cluster_name,
-                        ],
-                    )
+                    if not ctx.dbstore_variable:
+                        ctx.cluster.only(client).run(
+                            args=[
+                                'adjust-ulimits',
+                                'ceph-coverage',
+                                '{tdir}/archive/coverage'.format(tdir=testdir),
+                                'radosgw-admin',
+                                '-n', client_with_id,
+                                'mfa', 'create',
+                                '--uid', s3tests_conf[section]['user_id'],
+                                '--totp-serial', s3tests_conf[section]['totp_serial'],
+                                '--totp-seed', s3tests_conf[section]['totp_seed'],
+                                '--totp-seconds', s3tests_conf[section]['totp_seconds'],
+                                '--totp-window', '8',
+                                '--totp-seed-type', 'base32',
+                                '--cluster', cluster_name,
+                            ],
+                        )
 
     else:
         users = {'s3 main': 'foo', 's3 alt': 'bar', 's3 tenant': 'testx$tenanteduser'}
@@ -229,23 +230,24 @@ def create_users(ctx, config):
                             '--cluster', cluster_name,
                         ],
                     )
-                ctx.cluster.only(client).run(
-                        args=[
-                            'adjust-ulimits',
-                            'ceph-coverage',
-                            '{tdir}/archive/coverage'.format(tdir=testdir),
-                            'radosgw-admin',
-                            '-n', client_with_id,
-                            'mfa', 'create',
-                            '--uid', s3tests_conf[section]['user_id'],
-                            '--totp-serial', s3tests_conf[section]['totp_serial'],
-                            '--totp-seed', s3tests_conf[section]['totp_seed'],
-                            '--totp-seconds', s3tests_conf[section]['totp_seconds'],
-                            '--totp-window', '8',
-                            '--totp-seed-type', 'base32',
-                            '--cluster', cluster_name,
-                        ],
-                    )
+                if not ctx.dbstore_variable:
+                    ctx.cluster.only(client).run(
+                            args=[
+                                'adjust-ulimits',
+                                'ceph-coverage',
+                                '{tdir}/archive/coverage'.format(tdir=testdir),
+                                'radosgw-admin',
+                                '-n', client_with_id,
+                                'mfa', 'create',
+                                '--uid', s3tests_conf[section]['user_id'],
+                                '--totp-serial', s3tests_conf[section]['totp_serial'],
+                                '--totp-seed', s3tests_conf[section]['totp_seed'],
+                                '--totp-seconds', s3tests_conf[section]['totp_seconds'],
+                                '--totp-window', '8',
+                                '--totp-seed-type', 'base32',
+                                '--cluster', cluster_name,
+                            ],
+                        )
 
     if "TOKEN" in os.environ:
         s3tests_conf.setdefault('webidentity', {})
@@ -609,10 +611,17 @@ def task(ctx, config):
             ctx.sts_variable = True
         else:
             ctx.sts_variable = False
+
         if 'cloudtier_tests' in client_config:
             ctx.cloudtier_variable = True
         else:
             ctx.cloudtier_variable = False
+
+        if 'dbstore_tests' in client_config:
+            ctx.dbstore_variable = True
+        else:
+            ctx.dbstore_variable = False
+
         #This will be the structure of config file when you want to run webidentity_test (sts-test)
         if ctx.sts_variable and "TOKEN" in os.environ:
             for client in clients: