From b6424fa85fd61101f9becd9fb945b73d55019f82 Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Thu, 19 Nov 2020 17:33:22 +0200 Subject: [PATCH] rgw/amqp/kafka: prevent cuncurrent shutdowns from happening 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 --- src/rgw/rgw_admin.cc | 1 - src/rgw/rgw_sync_module_pubsub.cc | 25 ------------------------- src/rgw/rgw_sync_module_pubsub.h | 2 +- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 88cb5ee5a3b..aed1f52f296 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -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" diff --git a/src/rgw/rgw_sync_module_pubsub.cc b/src/rgw/rgw_sync_module_pubsub.cc index c1610747c39..1c921d59885 100644 --- a/src/rgw/rgw_sync_module_pubsub.cc +++ b/src/rgw/rgw_sync_module_pubsub.cc @@ -17,12 +17,6 @@ #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 #include @@ -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() diff --git a/src/rgw/rgw_sync_module_pubsub.h b/src/rgw/rgw_sync_module_pubsub.h index ac2bbdc2e77..8acc1a626f9 100644 --- a/src/rgw/rgw_sync_module_pubsub.h +++ b/src/rgw/rgw_sync_module_pubsub.h @@ -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 { -- 2.47.3