if no --remote or --url is given, set --remote = master_zone_id to
override the rest_master_conn (which refers to the old master zone)
Fixes: http://tracker.ceph.com/issues/15828
Signed-off-by: Casey Bodley <cbodley@redhat.com>
}
static int commit_period(RGWRealm& realm, RGWPeriod& period,
- const string& remote, const string& url,
+ string remote, const string& url,
const string& access, const string& secret)
{
const string& master_zone = period.get_master_zone();
return ret;
}
+ if (remote.empty() && url.empty()) {
+ // use the new master zone's connection
+ remote = master_zone;
+ cout << "Sending period to new master zone " << remote << std::endl;
+ }
+
// push period to the master with an empty period id
period.set_id("");