From a7397100aac2aa7e2d46767ce7ee246a70a7d51c Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Fri, 6 May 2022 00:03:56 +0530 Subject: [PATCH] rgw/qa: Run s3tests on dbstore backend in teuthology Add a new test-suite to run s3tests on dbstore backend. Signed-off-by: Soumya Koduri --- qa/suites/rgw/dbstore/+ | 0 qa/suites/rgw/dbstore/.qa | 1 + qa/suites/rgw/dbstore/cluster.yaml | 3 + qa/suites/rgw/dbstore/overrides.yaml | 11 +++ .../rgw/dbstore/supported-random-distro$ | 1 + qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml | 15 ++++ qa/tasks/s3tests.py | 77 +++++++++++-------- 7 files changed, 74 insertions(+), 34 deletions(-) create mode 100644 qa/suites/rgw/dbstore/+ create mode 120000 qa/suites/rgw/dbstore/.qa create mode 100644 qa/suites/rgw/dbstore/cluster.yaml create mode 100644 qa/suites/rgw/dbstore/overrides.yaml create mode 120000 qa/suites/rgw/dbstore/supported-random-distro$ create mode 100644 qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml diff --git a/qa/suites/rgw/dbstore/+ b/qa/suites/rgw/dbstore/+ new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/qa/suites/rgw/dbstore/.qa b/qa/suites/rgw/dbstore/.qa new file mode 120000 index 0000000000000..fea2489fdf6d9 --- /dev/null +++ b/qa/suites/rgw/dbstore/.qa @@ -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 index 0000000000000..496b51ba76a8f --- /dev/null +++ b/qa/suites/rgw/dbstore/cluster.yaml @@ -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 index 0000000000000..df4aaa9affa37 --- /dev/null +++ b/qa/suites/rgw/dbstore/overrides.yaml @@ -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 index 0000000000000..0862b4457b37a --- /dev/null +++ b/qa/suites/rgw/dbstore/supported-random-distro$ @@ -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 index 0000000000000..2042f832b6adc --- /dev/null +++ b/qa/suites/rgw/dbstore/tasks/rgw_s3tests.yaml @@ -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"] + diff --git a/qa/tasks/s3tests.py b/qa/tasks/s3tests.py index 626ede224b4ee..09e4defc2cd57 100644 --- a/qa/tasks/s3tests.py +++ b/qa/tasks/s3tests.py @@ -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: -- 2.39.5