From: Yuval Lifshitz Date: Thu, 19 Nov 2020 15:33:22 +0000 (+0200) Subject: rgw/amqp/kafka: prevent cuncurrent shutdowns from happening X-Git-Tag: v15.2.14~27^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba0b8061a92c68d6c2ee03469269a344721264da;p=ceph.git 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 (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. --- diff --git a/src/rgw/rgw_sync_module_pubsub.cc b/src/rgw/rgw_sync_module_pubsub.cc index 0dbe3400e69a..89eabec7851a 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 @@ -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() diff --git a/src/rgw/rgw_sync_module_pubsub.h b/src/rgw/rgw_sync_module_pubsub.h index ac2bbdc2e775..8acc1a626f9a 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 {