]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: add exclusive flag to set_as_default() 8404/head
authorCasey Bodley <cbodley@redhat.com>
Thu, 31 Mar 2016 21:19:12 +0000 (17:19 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 1 Apr 2016 16:01:24 +0000 (12:01 -0400)
commit280b8a1b85a49d0d78507176f18e6ced1a6fe067
treef9648b6cc558230c9144b13a97cb82226f258566
parent7567b45fc08c5d9c18d4117440c863189e43fdb6
rgw: add exclusive flag to set_as_default()

this dodges the race in RGWRealm::create() and RGWZoneParams::create()
that decides whether to set the new object as a default. by calling
set_as_default() with exclusive=true, it will fail with EEXIST if a
default is already set

it also fixes an issue with 'realm pull' on a secondary zone, where a
'default' zone may be created but never actually set_as_default()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h