]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix, cleanup
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 24 Oct 2019 23:10:48 +0000 (16:10 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 28 Jan 2020 18:20:37 +0000 (10:20 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_admin.cc
src/rgw/services/svc_bucket_sync_sobj.cc

index ff6083269162a01ffaaa96ce39d288f9d54a6665..bb34ed3b597628b37fdfd020486753cb02b557f8 100644 (file)
@@ -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;
 }
 
index 3c3a78e8cbd2088435a69a93aaa0fe664c5133e6..c7c2604c8774a1e3a974be0ba3dd572d40aa3b3e 100644 (file)
@@ -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;
 }