|
|
12fe4d |
From 178f6bdac97b57300bbe0956633cf686a7e3ccee Mon Sep 17 00:00:00 2001
|
|
|
12fe4d |
From: Yuval Lifshitz <ylifshit@redhat.com>
|
|
|
12fe4d |
Date: Fri, 12 Mar 2021 08:56:45 +0200
|
|
|
12fe4d |
Subject: [PATCH] librgw/notifications: initialize kafka and amqp
|
|
|
12fe4d |
|
|
|
12fe4d |
Fixes: https://tracker.ceph.com/issues/49738
|
|
|
12fe4d |
|
|
|
12fe4d |
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
|
|
|
12fe4d |
---
|
|
|
12fe4d |
src/rgw/librgw.cc | 23 +++++++++++++++++++++++
|
|
|
12fe4d |
1 file changed, 23 insertions(+)
|
|
|
12fe4d |
|
|
|
12fe4d |
diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc
|
|
|
12fe4d |
index 012cc54c3b..a5351dbe7c 100644
|
|
|
12fe4d |
--- a/src/rgw/librgw.cc
|
|
|
12fe4d |
+++ b/src/rgw/librgw.cc
|
|
|
12fe4d |
@@ -53,6 +53,12 @@
|
|
|
12fe4d |
#include "rgw_http_client.h"
|
|
|
12fe4d |
#include "rgw_http_client_curl.h"
|
|
|
12fe4d |
#include "rgw_perf_counters.h"
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
|
|
|
12fe4d |
+#include "rgw_amqp.h"
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
|
|
|
12fe4d |
+#include "rgw_kafka.h"
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
|
|
|
12fe4d |
#include "services/svc_zone.h"
|
|
|
12fe4d |
|
|
|
12fe4d |
@@ -617,6 +623,17 @@ namespace rgw {
|
|
|
12fe4d |
/* ignore error */
|
|
|
12fe4d |
}
|
|
|
12fe4d |
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
|
|
|
12fe4d |
+ if (!rgw::amqp::init(cct.get())) {
|
|
|
12fe4d |
+ derr << "ERROR: failed to initialize AMQP manager" << dendl;
|
|
|
12fe4d |
+ }
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
|
|
|
12fe4d |
+ if (!rgw::kafka::init(cct.get())) {
|
|
|
12fe4d |
+ derr << "ERROR: failed to initialize Kafka manager" << dendl;
|
|
|
12fe4d |
+ }
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
+
|
|
|
12fe4d |
return 0;
|
|
|
12fe4d |
} /* RGWLib::init() */
|
|
|
12fe4d |
|
|
|
12fe4d |
@@ -645,6 +662,12 @@ namespace rgw {
|
|
|
12fe4d |
rgw_shutdown_resolver();
|
|
|
12fe4d |
rgw_http_client_cleanup();
|
|
|
12fe4d |
rgw::curl::cleanup_curl();
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_AMQP_ENDPOINT
|
|
|
12fe4d |
+ rgw::amqp::shutdown();
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
+#ifdef WITH_RADOSGW_KAFKA_ENDPOINT
|
|
|
12fe4d |
+ rgw::kafka::shutdown();
|
|
|
12fe4d |
+#endif
|
|
|
12fe4d |
|
|
|
12fe4d |
rgw_perf_stop(g_ceph_context);
|
|
|
12fe4d |
|
|
|
12fe4d |
--
|
|
|
12fe4d |
2.26.2
|
|
|
12fe4d |
|