]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/rgw/multisite: specify realm/zonegroup/zone args for 'account create'
authorCasey Bodley <cbodley@redhat.com>
Fri, 30 Aug 2024 15:21:50 +0000 (11:21 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 30 Aug 2024 15:32:29 +0000 (11:32 -0400)
in the rgw/multisite suite, jobs fail on user creation:

> radosgw-admin --cluster c1 account create --account-id RGW11111111111111111
> radosgw-admin --cluster c1 user create --uid rgw-multisite-test-user --account-id RGW11111111111111111 --account-root --rgw-zone test-zone1 --rgw-zonegroup test-zonegroup --rgw-realm test-realm --display-name TestUser --gen-access-key --gen-secret
> could not create user: unable to create user, Failed to load account by id

realms/two-zones.yaml misspells `is_default` as `is default` for the
realm, so it doesn't get set as default. the `account create` command
doesn't specify a realm/zonegroup/zone, so operates on the "default"
zone and zonegroup

use `zone_args()` to add the explicit realm/zonegroup/zone arguments

Fixes: https://tracker.ceph.com/issues/67839
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/tasks/rgw_multisite_tests.py

index 822cbcf7910c9e9afa84fb14b1e1d200a3a86dee..e0a38deadd216ac9c6ba8f202b4bf4d57ee68610 100644 (file)
@@ -72,7 +72,9 @@ class RGWMultisiteTests(Task):
         # create test account/user
         log.info('creating test user..')
         user = multisite.User('rgw-multisite-test-user', account='RGW11111111111111111')
-        master_zone.cluster.admin(['account', 'create', '--account-id', user.account])
+        arg = ['--account-id', user.account]
+        arg += master_zone.zone_args()
+        master_zone.cluster.admin(['account', 'create'] + arg)
         user.create(master_zone, ['--display-name', 'TestUser',
                                   '--gen-access-key', '--gen-secret'])