]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/iam: CreateRole ignores EEXIST after forwarded request
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jul 2024 13:48:40 +0000 (09:48 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 18 Jul 2024 15:05:47 +0000 (11:05 -0400)
commitcd2042b1ad097af81615b3e24ac9afe14819f436
tree8272d4551a576fda828665a91ca1b7daf715f6ee
parent832ba5080308ec0c06249a51c95970f7fec754cf
rgw/iam: CreateRole ignores EEXIST after forwarded request

when issued against a secondary zone in multisite, the CreateRole
request is first forwarded to the metadata master zone and created there

once that forwarded request succeeds, the secondary zone creates the
same role. between these two events, metadata sync may race to replicate
that role from the master. this causes the local role creation to fail
with EEXIST

ignore EEXIST errors from local role creation if we know that our
forwarded request succeeded

Fixes: https://tracker.ceph.com/issues/67012
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_role.cc