From: Yuval Lifshitz Date: Mon, 11 Nov 2024 17:48:39 +0000 (+0000) Subject: test/rgw/logging: add bucket logging test suite to teuthology X-Git-Tag: v20.0.0~565^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bb40fe448df6f8a886ceaded7a527a23c45cd601;p=ceph.git test/rgw/logging: add bucket logging test suite to teuthology this is depended with this s3test PR: https://github.com/ceph/s3-tests/pull/576 Signed-off-by: Yuval Lifshitz --- diff --git a/qa/rgw/s3tests-branch.yaml b/qa/rgw/s3tests-branch.yaml index ef6819c87e06a..8710ce35893b1 100644 --- a/qa/rgw/s3tests-branch.yaml +++ b/qa/rgw/s3tests-branch.yaml @@ -1,4 +1,4 @@ overrides: s3tests: - force-branch: ceph-master - # git_remote: https://github.com/ceph/ + force-branch: ceph-master + # git_remote: https://github.com/ceph/ diff --git a/qa/suites/rgw/bucket-logging/% b/qa/suites/rgw/bucket-logging/% new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/qa/suites/rgw/bucket-logging/.qa b/qa/suites/rgw/bucket-logging/.qa new file mode 120000 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/rgw/bucket-logging/.qa @@ -0,0 +1 @@ +../.qa/ \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/0-install.yaml b/qa/suites/rgw/bucket-logging/0-install.yaml new file mode 100644 index 0000000000000..6cf82f5747602 --- /dev/null +++ b/qa/suites/rgw/bucket-logging/0-install.yaml @@ -0,0 +1,13 @@ +tasks: +- install: +- ceph: +- openssl_keys: +- rgw: [client.0] +- tox: [client.0] + +overrides: + ceph: + conf: + global: + osd_min_pg_log_entries: 10 + osd_max_pg_log_entries: 10 diff --git a/qa/suites/rgw/bucket-logging/beast.yaml b/qa/suites/rgw/bucket-logging/beast.yaml new file mode 120000 index 0000000000000..09ced62c42aa8 --- /dev/null +++ b/qa/suites/rgw/bucket-logging/beast.yaml @@ -0,0 +1 @@ +.qa/rgw_frontend/beast.yaml \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/fixed-1.yaml b/qa/suites/rgw/bucket-logging/fixed-1.yaml new file mode 120000 index 0000000000000..02df5dd0cd043 --- /dev/null +++ b/qa/suites/rgw/bucket-logging/fixed-1.yaml @@ -0,0 +1 @@ +.qa/clusters/fixed-1.yaml \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/ignore-pg-availability.yaml b/qa/suites/rgw/bucket-logging/ignore-pg-availability.yaml new file mode 120000 index 0000000000000..32340b1fa8be8 --- /dev/null +++ b/qa/suites/rgw/bucket-logging/ignore-pg-availability.yaml @@ -0,0 +1 @@ +.qa/rgw/ignore-pg-availability.yaml \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/overrides.yaml b/qa/suites/rgw/bucket-logging/overrides.yaml new file mode 100644 index 0000000000000..a448a323d363d --- /dev/null +++ b/qa/suites/rgw/bucket-logging/overrides.yaml @@ -0,0 +1,10 @@ +overrides: + ceph: + conf: + client: + setuser: ceph + setgroup: ceph + debug rgw: 20 + rgw bucket logging obj roll time: 5 + rgw: + storage classes: LUKEWARM, FROZEN diff --git a/qa/suites/rgw/bucket-logging/s3tests-branch.yaml b/qa/suites/rgw/bucket-logging/s3tests-branch.yaml new file mode 120000 index 0000000000000..bdcaca48ae02b --- /dev/null +++ b/qa/suites/rgw/bucket-logging/s3tests-branch.yaml @@ -0,0 +1 @@ +.qa/rgw/s3tests-branch.yaml \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/supported-distros b/qa/suites/rgw/bucket-logging/supported-distros new file mode 120000 index 0000000000000..78f2991b407af --- /dev/null +++ b/qa/suites/rgw/bucket-logging/supported-distros @@ -0,0 +1 @@ +.qa/distros/supported-random-distro$/ \ No newline at end of file diff --git a/qa/suites/rgw/bucket-logging/tasks/+ b/qa/suites/rgw/bucket-logging/tasks/+ new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/qa/suites/rgw/bucket-logging/tasks/s3tests.yaml b/qa/suites/rgw/bucket-logging/tasks/s3tests.yaml new file mode 100644 index 0000000000000..c1d3b7192e15d --- /dev/null +++ b/qa/suites/rgw/bucket-logging/tasks/s3tests.yaml @@ -0,0 +1,6 @@ +tasks: +- s3tests: + client.0: + boto3_extensions: True + rgw_server: client.0 + extra_attrs: ["bucket_logging"] diff --git a/qa/tasks/s3tests.py b/qa/tasks/s3tests.py index 6d7b39d589210..85ab97d23cd26 100644 --- a/qa/tasks/s3tests.py +++ b/qa/tasks/s3tests.py @@ -57,6 +57,17 @@ def download(ctx, config): 'git', 'reset', '--hard', sha1, ], ) + if client_config.get('boto3_extensions'): + ctx.cluster.only(client).run( + args=['mkdir', + '-p', + '/home/ubuntu/.aws/models/s3/2006-03-01/'] + ) + (remote,) = ctx.cluster.only(client).remotes.keys() + remote_file = '/home/ubuntu/.aws/models/s3/2006-03-01/service-2.sdk-extras.json' + local_file = '{qadir}/../examples/rgw/boto3/service-2.sdk-extras.json'.format(qadir=ctx.config.get('suite_path')) + remote.put_file(local_file, remote_file) + try: yield finally: @@ -70,6 +81,17 @@ def download(ctx, config): '{tdir}/s3-tests-{client}'.format(tdir=testdir, client=client), ], ) + if client_config.get('boto3_extensions'): + ctx.cluster.only(client).run( + args=[ + 'rm', '-rf', '/home/ubuntu/.aws/models/s3/2006-03-01/service-2.sdk-extras.json', + ], + ) + ctx.cluster.only(client).run( + args=[ + 'cd', '/home/ubuntu/', run.Raw('&&'), 'rmdir', '-p', '.aws/models/s3/2006-03-01/', + ], + ) def _config_user(s3tests_conf, section, user, email): @@ -444,8 +466,10 @@ def run_tests(ctx, config): attrs += ['not fails_with_subdomain'] if not client_config.get('with-sse-s3'): attrs += ['not sse_s3'] - + attrs += client_config.get('extra_attrs', []) + if 'bucket_logging' not in attrs: + attrs += ['not bucket_logging'] if 'unit_test_scan' in client_config and client_config['unit_test_scan']: xmlfile_id = datetime.datetime.now().strftime("%Y-%m-%d-%H:%M:%S--") + str(uuid.uuid4()) xmlpath= f'{testdir}/archive/s3test-{xmlfile_id}.xml'