return ret;
}
+ /* update rest_master_conn if not already created*/
+ if (zonegroup.is_master) {
+ if (!store->rest_master_conn) {
+ store->rest_master_conn = new RGWRESTConn(cct, store, zonegroup.endpoints);
+ derr << "creating rest_master_conn " << dendl;
+ }
+ }
+
RGWPeriod period(realm.get_current_period());
ret = period.init(cct, store, realm.get_id());
if (ret < 0) {
#define dout_subsys ceph_subsys_rgw
-RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWRados *store, list<string>& remote_endpoints) : cct(_cct)
+RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWRados *store, const list<string>& remote_endpoints) : cct(_cct)
{
- list<string>::iterator iter;
+ list<string>::const_iterator iter;
int i;
for (i = 0, iter = remote_endpoints.begin(); iter != remote_endpoints.end(); ++iter, ++i) {
endpoints[i] = *iter;
public:
- RGWRESTConn(CephContext *_cct, RGWRados *store, list<string>& endpoints);
+ RGWRESTConn(CephContext *_cct, RGWRados *store, const list<string>& endpoints);
int get_url(string& endpoint);
string get_url();
const string& get_zonegroup() {