Currently a master zone delete in a zonegroup followed by a period commit would
render RGWRados to be unusable, check if the zonegroup is empty and continue
initialization in these cases so that removal can proceed.
Fixes: http://tracker.ceph.com/issues/37328
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
58eb3545e4db2c9208fbc09789b89dd9d2ff7a71)
* src/rgw/services/svc_zone.cc
Changes are made to the same function in rgw_rados.cc
as the rgw_rados refactor is post mimic
// use endpoints from the zonegroup's master zone
auto master = zg.zones.find(zg.master_zone);
if (master == zg.zones.end()) {
+ // Check for empty zonegroup which can happen if zone was deleted before removal
+ if (zg.zones.size() == 0)
+ continue;
// fix missing master zone for a single zone zonegroup
if (zg.master_zone.empty() && zg.zones.size() == 1) {
master = zg.zones.begin();