Skip to content

Commit

Permalink
test/rgw/logging: add bucket logging test suite to teuthology
Browse files Browse the repository at this point in the history
this is depended with this s3test PR:
ceph/s3-tests#576

and the bucket logging PR:
ceph#59808

also point to the s3test of bucket logging.
this should be reverted before merging.

Signed-off-by: Yuval Lifshitz <[email protected]>
  • Loading branch information
yuvalif committed Nov 26, 2024
1 parent 9aab8e7 commit 2ac8c10
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qa/rgw/s3tests-branch.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
overrides:
s3tests:
force-branch: ceph-master
# git_remote: https://github.com/ceph/
force-branch: wip-yuval-bucket-logging
git_remote: https://github.com/yuvalif/
1 change: 1 addition & 0 deletions qa/rgw/service-2.sdk-extras.json
Empty file added qa/suites/rgw/bucket-logging/%
Empty file.
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/.qa
13 changes: 13 additions & 0 deletions qa/suites/rgw/bucket-logging/0-install.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/beast.yaml
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/fixed-1.yaml
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/ignore-pg-availability.yaml
10 changes: 10 additions & 0 deletions qa/suites/rgw/bucket-logging/overrides.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/s3tests-branch.yaml
1 change: 1 addition & 0 deletions qa/suites/rgw/bucket-logging/supported-distros
Empty file.
6 changes: 6 additions & 0 deletions qa/suites/rgw/bucket-logging/tasks/s3tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
tasks:
- s3tests:
client.0:
boto3_extensions: True
rgw_server: client.0
extra_attrs: ["bucket_logging"]
29 changes: 28 additions & 1 deletion qa/tasks/s3tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ 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/']
)
ctx.cluster.only(client).run(
args=['cd', '/home/ubuntu/.aws/models/s3/2006-03-01/',
run.Raw('&&'),
'cp',
'{qadir}/rgw/service-2.sdk-extras.json'.format(qadir=client_config.get('suite_path')),
'service-2.sdk-extras.json']
)

try:
yield
finally:
Expand All @@ -70,6 +84,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):
Expand Down Expand Up @@ -444,8 +469,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'
Expand Down

0 comments on commit 2ac8c10

Please sign in to comment.