#include "rgw/rgw_sync_module.h"
#include "rgw/rgw_zone.h"
+#define dout_subsys ceph_subsys_rgw
+
void RGWSI_SyncModules::init(RGWSI_Zone *zone_svc)
{
svc.zone = zone_svc;
return ret;
}
+ ldout(cct, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl;
+
return 0;
}
if (ret < 0) {
return ret;
}
- ret = sync_modules_svc->start();
- if (ret < 0) {
- return ret;
- }
+
ret = realm->init(cct, sysobj_svc);
if (ret < 0 && ret != -ENOENT) {
ldout(cct, 0) << "failed reading realm info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
}
if (zone_iter != zonegroup->zones.end()) {
*zone_public_config = zone_iter->second;
- ldout(cct, 20) << "zone " << zone_params->get_name() << dendl;
+ ldout(cct, 20) << "zone " << zone_params->get_name() << " found" << dendl;
} else {
lderr(cct) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << ")" << dendl;
return -EINVAL;
zone_short_id = current_period->get_map().get_zone_short_id(zone_params->get_id());
+ ret = sync_modules_svc->start();
+ if (ret < 0) {
+ return ret;
+ }
+
RGWSyncModuleRef sm;
if (!sync_modules_svc->get_manager()->get_module(zone_public_config->tier_type, &sm)) {
lderr(cct) << "ERROR: tier type not found: " << zone_public_config->tier_type << dendl;
if (zone_by_id.find(zone_id()) == zone_by_id.end()) {
ldout(cct, 0) << "WARNING: could not find zone config in zonegroup for local zone (" << zone_id() << "), will use defaults" << dendl;
}
- *zone_public_config = zone_by_id[zone_id()];
+
for (const auto& ziter : zonegroup->zones) {
const string& id = ziter.first;
const RGWZone& z = ziter.second;
}
}
+ ldout(cct, 20) << "started zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() <<
+ ") with tier type = " << zone_public_config->tier_type << dendl;
+
return 0;
}