From: Yehuda Sadeh Date: Thu, 24 Oct 2019 23:10:48 +0000 (-0700) Subject: rgw: fix, cleanup X-Git-Tag: v15.1.0~22^2~82 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=12989575f3c02865e8507101848ae0551cb28c2b;p=ceph.git rgw: fix, cleanup Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index ff6083269162..bb34ed3b5976 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -2413,33 +2413,6 @@ static int bucket_sync_info(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& return 0; } -#if 0 -#warning need to use bucket sources - auto& zone_conn_map = store->svc()->zone->get_zone_conn_map(); - if (!source_zone_id.empty()) { - auto z = zonegroup.zones.find(source_zone_id); - if (z == zonegroup.zones.end()) { - lderr(store->ctx()) << "Source zone not found in zonegroup " - << zonegroup.get_name() << dendl; - return -EINVAL; - } - auto c = zone_conn_map.find(source_zone_id); - if (c == zone_conn_map.end()) { - lderr(store->ctx()) << "No connection to zone " << z->second.name << dendl; - return -EINVAL; - } - return bucket_source_sync_status(store, zone, z->second, c->second, - info, width, out); - } - - for (const auto& z : zonegroup.zones) { - auto c = zone_conn_map.find(z.second.id); - if (c != zone_conn_map.end()) { - bucket_source_sync_status(store, zone, z.second, c->second, - info, width, out); - } - } -#endif RGWBucketSyncPolicyHandlerRef handler; int r = store->ctl()->bucket->get_sync_policy_handler(info.bucket, &handler, null_yield); @@ -2458,10 +2431,6 @@ static int bucket_sync_info(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& } } - JSONFormatter f; - encode_json("sources", sources, &f); - f.flush(out); - return 0; } diff --git a/src/rgw/services/svc_bucket_sync_sobj.cc b/src/rgw/services/svc_bucket_sync_sobj.cc index 3c3a78e8cbd2..c7c2604c8774 100644 --- a/src/rgw/services/svc_bucket_sync_sobj.cc +++ b/src/rgw/services/svc_bucket_sync_sobj.cc @@ -74,6 +74,8 @@ int RGWSI_Bucket_Sync_SObj::get_policy_handler(RGWSI_Bucket_BI_Ctx& ctx, ldout(cct, 20) << "couldn't put bucket_sync_policy cache entry, might have raced with data changes" << dendl; } + *handler = e.handler; + return 0; }