We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5606f36 + 1621dbb commit 1d15f54Copy full SHA for 1d15f54
heartbeat/rabbitmq-cluster
@@ -238,6 +238,11 @@ rmq_start_first()
238
return $rc
239
}
240
241
+rmq_is_clustered()
242
+{
243
+ $RMQ_CTL eval 'rabbit_mnesia:is_clustered().' | grep -q true
244
+}
245
+
246
rmq_join_existing()
247
{
248
local join_list="$1"
@@ -249,6 +254,11 @@ rmq_join_existing()
249
254
return $OCF_ERR_GENERIC
250
255
fi
251
256
257
+ if rmq_is_clustered; then
258
+ ocf_log info "Successfully re-joined existing rabbitmq cluster automatically"
259
+ return $OCF_SUCCESS
260
+ fi
261
252
262
# unconditionally join the cluster
253
263
$RMQ_CTL stop_app > /dev/null 2>&1
264
for node in $(echo "$join_list"); do
0 commit comments