Skip to content

Commit

Permalink
Merge pull request #9327: jewel: rgw: add_zone only clears master_zon…
Browse files Browse the repository at this point in the history
…e if --master=false

Reviewed-by:
  • Loading branch information
Loic Dachary committed Jun 16, 2016
2 parents c6d7170 + 933fdef commit f106236
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/rgw/rgw_rados.cc
Expand Up @@ -238,13 +238,15 @@ int RGWZoneGroup::equals(const string& other_zonegroup) const

int RGWZoneGroup::add_zone(const RGWZoneParams& zone_params, bool *is_master, bool *read_only, const list<string>& endpoints)
{
if (is_master && *is_master) {
if (!master_zone.empty() && master_zone != zone_params.get_id()) {
ldout(cct, 0) << "NOTICE: overriding master zone: " << master_zone << dendl;
if (is_master) {
if (*is_master) {
if (!master_zone.empty() && master_zone != zone_params.get_id()) {
ldout(cct, 0) << "NOTICE: overriding master zone: " << master_zone << dendl;
}
master_zone = zone_params.get_id();
} else if (master_zone == zone_params.get_id()) {
master_zone.clear();
}
master_zone = zone_params.get_id();
} else if (master_zone == zone_params.get_id()) {
master_zone ="";
}

RGWZone& zone = zones[zone_params.get_id()];
Expand Down

0 comments on commit f106236

Please sign in to comment.