]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/amqp/kafka: prevent cuncurrent shutdowns from happening 38190/head
authorYuval Lifshitz <ylifshit@redhat.com>
Thu, 19 Nov 2020 15:33:22 +0000 (17:33 +0200)
committerYuval Lifshitz <ylifshit@redhat.com>
Wed, 9 Dec 2020 09:40:23 +0000 (11:40 +0200)
this may be causing radosgw-admin and possibly radosgw to hang during
shutdown

fixes: https://tracker.ceph.com/issues/48293

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
src/rgw/rgw_admin.cc
src/rgw/rgw_sync_module_pubsub.cc
src/rgw/rgw_sync_module_pubsub.h

index 88cb5ee5a3bbecd8f8abf3b28e0c594cc1e50ccd..aed1f52f296a4969c9176f07671181da1a0fe204 100644 (file)
@@ -57,7 +57,6 @@ extern "C" {
 #include "rgw_http_client_curl.h"
 #include "rgw_zone.h"
 #include "rgw_pubsub.h"
-#include "rgw_sync_module_pubsub.h"
 #include "rgw_bucket_sync.h"
 #include "rgw_sync_checkpoint.h"
 #include "rgw_lua.h"
index c1610747c39024b0fe8b9ad0d5fb4d9e999d8e34..1c921d598851630cef58e2d50c826c2b26bb4d3c 100644 (file)
 #include "rgw_pubsub_push.h"
 #include "rgw_notify_event_type.h"
 #include "rgw_perf_counters.h"
-#ifdef WITH_RADOSGW_AMQP_ENDPOINT
-#include "rgw_amqp.h"
-#endif
-#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
-#include "rgw_kafka.h"
-#endif
 
 #include <boost/algorithm/hex.hpp>
 #include <boost/asio/yield.hpp>
@@ -1383,25 +1377,6 @@ RGWPSSyncModuleInstance::RGWPSSyncModuleInstance(CephContext *cct, const JSONFor
   } else {
     effective_conf.decode_json(&p);
   }
-#ifdef WITH_RADOSGW_AMQP_ENDPOINT
-  if (!rgw::amqp::init(cct)) {
-    ldout(cct, 1) << "ERROR: failed to initialize AMQP manager in pubsub sync module" << dendl;
-  }
-#endif
-#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
-  if (!rgw::kafka::init(cct)) {
-    ldout(cct, 1) << "ERROR: failed to initialize Kafka manager in pubsub sync module" << dendl;
-  }
-#endif
-}
-
-RGWPSSyncModuleInstance::~RGWPSSyncModuleInstance() {
-#ifdef WITH_RADOSGW_AMQP_ENDPOINT
-  rgw::amqp::shutdown();
-#endif
-#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
-  rgw::kafka::shutdown();
-#endif
 }
 
 RGWDataSyncModule *RGWPSSyncModuleInstance::get_data_handler()
index ac2bbdc2e775fd6630e2dbffd13703a1f8c1c9e0..8acc1a626f9ae0f7ed7f075a40f32e21bc56abe0 100644 (file)
@@ -26,7 +26,7 @@ class RGWPSSyncModuleInstance : public RGWSyncModuleInstance {
   JSONFormattable effective_conf;
 public:
   RGWPSSyncModuleInstance(CephContext *cct, const JSONFormattable& config);
-  ~RGWPSSyncModuleInstance();
+  ~RGWPSSyncModuleInstance() = default;
   RGWDataSyncModule *get_data_handler() override;
   RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override;
   bool supports_user_writes() override {