]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/amqp/kafka: prevent cuncurrent shutdowns from happening 40381/head
authorYuval Lifshitz <ylifshit@redhat.com>
Thu, 19 Nov 2020 15:33:22 +0000 (17:33 +0200)
committersinguliere <singuliere@autistici.org>
Sun, 11 Apr 2021 21:41:41 +0000 (23:41 +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>
(cherry picked from commit b6424fa85fd61101f9becd9fb945b73d55019f82)

Conflicts: src/rgw/rgw_admin.cc
       exclude this hunk from the backport because octopus still
       needs it for the commands that were removed in
       4c486c32c6dc21d8650d8ec2e446950d82631be5. In addition this hunk
       is a cleanup unrelated to the backport.

src/rgw/rgw_sync_module_pubsub.cc
src/rgw/rgw_sync_module_pubsub.h

index 0dbe3400e69ab28847a09b70f25e16b9072385e3..89eabec7851a4d931a753187cd81bef56d93690d 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>
@@ -1553,25 +1547,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 {