]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: RGWPeriod::reflect() sets master zonegroup as default 8566/head
authorCasey Bodley <cbodley@redhat.com>
Tue, 12 Apr 2016 20:21:13 +0000 (16:21 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 13 Apr 2016 14:44:17 +0000 (10:44 -0400)
commit5230967dad86120cd0748c53d8ac6ae8820ae340
tree53430c7fb014c84139d087f0ce9d2391bc157908
parent18a5fddb90d180315e1817c0f7341101636408b2
rgw: RGWPeriod::reflect() sets master zonegroup as default

if RGWPeriod::reflect() is called right after a 'realm pull', it will
create the zonegroup objects but not set any as default.  so the next
time RGWRados is initialized, create_defaults() will add a new 'default'
zonegroup and set it as the master.  this causes a 'period update' to
find multiple master zonegroups and fail with EINVAL

reflect() now calls set_as_default(exclusive=true) on the master
zonegroup to guarantee that a default is set

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