]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/pubsub: service reordering issue
authorYuval Lifshitz <yuvalif@yahoo.com>
Sun, 25 Aug 2019 14:12:53 +0000 (17:12 +0300)
committerYuval Lifshitz <yuvalif@yahoo.com>
Tue, 27 Aug 2019 11:36:08 +0000 (14:36 +0300)
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
src/rgw/rgw_pubsub.h
src/rgw/services/svc_sync_modules.cc
src/rgw/services/svc_zone.cc

index d1440b12a983e258b8a64fb022ef78d8975ff9c8..f1632e31ee1cf29aa94984cd2ec6cabcf2eebde8 100644 (file)
@@ -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());
index 7abda3debb1bd1b9a1290606e0c1ebfed6a06a15..a37da0ec0f5a8492664e98fd151df03a1a770ddd 100644 (file)
@@ -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;
 }
 
index 13833c85a0fae904959d9df64e5cf5367ad149d8..056e57253bec9a7ef0694df5e2403a272e3c5e0f 100644 (file)
@@ -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;
 }