From: Yuval Lifshitz Date: Sun, 25 Aug 2019 14:12:53 +0000 (+0300) Subject: rgw/pubsub: service reordering issue X-Git-Tag: v15.1.0~1753^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e91489f443b5b086ef96b51051d2726728412ff5;p=ceph-ci.git rgw/pubsub: service reordering issue Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_pubsub.h b/src/rgw/rgw_pubsub.h index d1440b12a98..f1632e31ee1 100644 --- a/src/rgw/rgw_pubsub.h +++ b/src/rgw/rgw_pubsub.h @@ -616,7 +616,6 @@ int RGWUserPubSub::write(const rgw_raw_obj& obj, const T& info, RGWObjVersionTra bufferlist bl; encode(info, bl); - auto obj_ctx = store->svc()->sysobj->init_obj_ctx(); int ret = rgw_put_system_obj(obj_ctx, obj.pool, obj.oid, bl, false, objv_tracker, real_time()); diff --git a/src/rgw/services/svc_sync_modules.cc b/src/rgw/services/svc_sync_modules.cc index 7abda3debb1..a37da0ec0f5 100644 --- a/src/rgw/services/svc_sync_modules.cc +++ b/src/rgw/services/svc_sync_modules.cc @@ -7,6 +7,8 @@ #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; @@ -30,6 +32,8 @@ int RGWSI_SyncModules::do_start() return ret; } + ldout(cct, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl; + return 0; } diff --git a/src/rgw/services/svc_zone.cc b/src/rgw/services/svc_zone.cc index 13833c85a0f..056e57253be 100644 --- a/src/rgw/services/svc_zone.cc +++ b/src/rgw/services/svc_zone.cc @@ -63,10 +63,7 @@ int RGWSI_Zone::do_start() 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; @@ -146,7 +143,7 @@ int RGWSI_Zone::do_start() } 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; @@ -154,6 +151,11 @@ int RGWSI_Zone::do_start() 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; @@ -173,7 +175,7 @@ int RGWSI_Zone::do_start() 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; @@ -200,6 +202,9 @@ int RGWSI_Zone::do_start() } } + 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; }