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