qa/rgw: run s3tests against keystone ec2#52813
Conversation
|
cc @tobias-urdin, thanks for the pointers in #52673 (comment) |
|
it might make sense to rename this rgw/tempest suite to rgw/keystone, and run tempest and s3test tasks as 2 separate jobs |
qa/tasks/keystone.py
Outdated
| run_in_keystone_venv(ctx, client, | ||
| [ 'openstack', 'ec2', 'credentials', 'list', '--debug' ] + | ||
| os_auth_args(public_host, public_port) | ||
| return ( 'access', 'secret' ) # TODO |
There was a problem hiding this comment.
will need to see what this output looks like in order to parse it correctly
There was a problem hiding this comment.
this is what the ec2 credentials create command returned:
RESP BODY: {"credential": {"user_id": "d41f3e2a147044eca92fa604951dccd9", "tenant_id": "3b5f6f00a3b84b4bb857c6e456dd2abf", "access": "ab19b2a007d7489fa433db6cc0e30333", "secret": "6e141ec00c5b41468d92cad54e181637", "trust_id": null, "links": {...}}}
1dd2e91 to
2b15abc
Compare
|
this is great! will check it out next week, thanks |
LGTM, looking forward to some test results that it works. I think separating them might be a good idea |
qa/tasks/keystone.py
Outdated
| proc = run_in_keystone_venv(ctx, client, | ||
| ['openstack', 'ec2', 'credentials', 'list', | ||
| '--user', user, '--format', 'json', '--debug'] + | ||
| os_auth_args(public_host, public_port), | ||
| stdout=StringIO()) | ||
| response = json.loads(proc.stdout.getvalue()) |
There was a problem hiding this comment.
making some progress:
2023-08-08T16:12:06.337 INFO:teuthology.orchestra.run.smithi062.stdout:[
2023-08-08T16:12:06.337 INFO:teuthology.orchestra.run.smithi062.stdout: {
2023-08-08T16:12:06.337 INFO:teuthology.orchestra.run.smithi062.stdout: "Access": "6351f6d729454264ba27a4a1832c3f8d",
2023-08-08T16:12:06.337 INFO:teuthology.orchestra.run.smithi062.stdout: "Secret": "651d8ede06934828bb5666b996d22410",
2023-08-08T16:12:06.337 INFO:teuthology.orchestra.run.smithi062.stdout: "Project ID": "5ce5ea6c00ae47fa9edb966b12b27686",
2023-08-08T16:12:06.338 INFO:teuthology.orchestra.run.smithi062.stdout: "User ID": "5c692f3ae22a417bac41acab291d81e1"
2023-08-08T16:12:06.338 INFO:teuthology.orchestra.run.smithi062.stdout: }
2023-08-08T16:12:06.338 INFO:teuthology.orchestra.run.smithi062.stdout:]
2023-08-08T16:12:06.469 ERROR:teuthology.contextutil:Saw exception from nested tasks
Traceback (most recent call last):
File "/home/teuthworker/src/git.ceph.com_teuthology_7fda95956ac10132c9b74016ba832db907df09fa/teuthology/contextutil.py", line 30, in nested
vars.append(enter())
File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
return next(self.gen)
File "/home/teuthworker/src/github.com_cbodley_ceph_91cc18c91d8eafc57e15922762084e7051d083a6/qa/tasks/s3tests.py", line 114, in create_users
access, secret = ctx.keystone.read_ec2_credentials(ctx, **keystone_user)
File "/home/teuthworker/src/github.com_cbodley_ceph_91cc18c91d8eafc57e15922762084e7051d083a6/qa/tasks/keystone.py", line 435, in read_ec2_credentials
response = json.loads(proc.stdout.getvalue())
AttributeError: 'NoneType' object has no attribute 'stdout'
There was a problem hiding this comment.
not sure what it's complaining about now
response = json.loads(proc.stdout.getvalue())
AttributeError: 'list' object has no attribute 'stdout'
There was a problem hiding this comment.
Usually, that means the command (credentials list?) didn't have any output. Bad connection or crash, maybe?
There was a problem hiding this comment.
got this part working:
2023-08-09T16:54:20.630 INFO:tasks.keystone:proc: [RemoteProcess(client=<paramiko.client.SSHClient object at 0x7f931a84b970>, args=['cd', '/home/ubuntu/cephtest/keystone', Raw('&&'), 'source', '.tox/venv/bin/activate', Raw('&&'), 'openstack', 'ec2', 'credentials', 'list', '--user', 's3tests-main', '--format', 'json', '--debug', '--os-username', 'admin', '--os-password', 'ADMIN', '--os-user-domain-id', 'default', '--os-project-name', 'admin', '--os-project-domain-id', 'default', '--os-identity-api-version', '3', '--os-auth-url', 'http://smithi177.front.sepia.ceph.com:5000/v3'], check_status=True, hostname='smithi177')]
2023-08-09T16:54:20.630 INFO:tasks.keystone:response: [{'Access': 'f0fdcaa1f1ac4b58ba6c46ab10885b49', 'Secret': '88f51ec220db44499c0dd6145342f7b9', 'Project ID': 'cf23225fc9af4c54a8a310dec694b53a', 'User ID': '4ee9cbac66ac45fc862a11a7adb5683b'}]
2023-08-09T16:54:20.630 DEBUG:tasks.s3tests:Using keystone user s3tests-main credentials (f0fdcaa1f1ac4b58ba6c46ab10885b49 : 88f51ec220db44499c0dd6145342f7b9) for foo.client.0 on client.0
2023-08-09T16:54:20.631 DEBUG:tasks.s3tests:Creating user bar.client.0 on client.0
5292b60 to
0daef22
Compare
|
i got the s3tests running, but they all fail with |
fd94e83 to
d7d5733
Compare
|
last attempt was filled with |
|
with
|
Just a quick guess would be that you need to assign the The below part, like it's done for rgwcrypt suite since we have |
|
getting better! http://qa-proxy.ceph.com/teuthology/cbodley-2023-08-10_18:30:57-rgw:tempest-main-distro-default-smithi/7364897/teuthology.log
some acl tests failing because they expect the DisplayName to be some encryption tests failing because they probably need extra config when the s3tests task cleans up, it fails trying to delete the local user that we didn't create:
|
faf86d7 to
fa3d274
Compare
|
down to a single s3test failure in http://qa-proxy.ceph.com/teuthology/cbodley-2023-09-25_17:25:06-rgw:tempest-main-distro-default-smithi/7402007/teuthology.log: |
That's awesome! That error is probably valid as well and the test needs to be changed to accommodate the difference in response when Keystone auth is used per https://github.com/ceph/ceph/blob/main/src/rgw/rgw_auth_keystone.cc#L448-L455 |
|
rgw log from that failing test: because when looking up an access key in keystone's secret cache (https://github.com/ceph/ceph/blame/ad54514/src/rgw/rgw_auth_keystone.cc#L575-L582), we'll only use a cached secret if its signature matches the client's. but the test deliberately signs with the wrong secret key roflmao, so we never get to the point where we'd fail with |
i opened #53680 with a proposed fix, and created https://tracker.ceph.com/issues/62989 to track the backports |
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Fixes: https://tracker.ceph.com/issues/59424 Signed-off-by: Casey Bodley <cbodley@redhat.com>
tempest relies on `frontend_prefix: /swift` to serve the swift api from the root path s3tests relies on the same for s3. move the frontend_prefix override into the tempest task so it doesn't apply to s3tests Signed-off-by: Casey Bodley <cbodley@redhat.com>
|
bundled with the fix from #53846, this passed qa in https://pulpito.ceph.com/cbodley-2023-10-06_14:43:00-rgw-wip-62989-again-distro-default-smithi/. we'll need to merge the fix first |
everything's passing now, this is ready for review |
|
passed qa after rerun in https://pulpito.ceph.com/cbodley-2023-11-03_18:34:54-rgw-wip-cbodley-testing-distro-default-smithi/ |
|
@dang @alimaredia may i kindly request a final review/approval? |
|
If I understand this right, the reason to bundle s3tests+ec2 & tempest together is because the tempest test sets up keystone. But - setting up keystone is fast, running s3tests or tempest is slow. I'd rather see this as 2 separate tests because that makes it easy to run just the s3 or tempest part alone. |
thanks @mdw-at-linuxbox. it does run the s3tests as a separate job, because that requires radosgw to be configured for s3-at-root while tempest requires swift-at-root. you can use --filter to select one or the other |
allow keystone task's yaml to create ec2 credentials for its users
allow s3test task's yaml to point at keystone users instead of creating a local user with radosgw-admin
add an s3test task to the rgw/tempest suite
Fixes: https://tracker.ceph.com/issues/59424
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows