]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/iam: CreateRole ignores EEXIST after forwarded request 58782/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 18 Jul 2024 13:48:40 +0000 (09:48 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 24 Jul 2024 12:11:54 +0000 (08:11 -0400)
commit63ce5d9c12c107f63660442178a62e010035bd7f
tree500e44602f28d506e9d920e011afb34c85b1c47a
parent46c551b8a65961060d36895f89c179f4115c3147
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>
(cherry picked from commit cd2042b1ad097af81615b3e24ac9afe14819f436)
src/rgw/rgw_rest_role.cc