rabbitmq-server/pull-request-20.patch
Dirk Mueller ba4a22848a Accepting request 485761 from home:vuntz:branches:network:messaging:amqp
- Stop shipping rabbitmq-server OCF resource agent as source file
  while it's included in the upstream tarball. Add patches for code
  that was specific to our variant; they now got upstreamed, but
  are not in this version of rabbitmq yet: pull-request-20.patch
  and pull-request-21.patch.
- Also package the rabbitmq-server-ha OCF resource agent as it
  seems to be more appropriate for clustering. Add upstream fixes
  for making it more solid: pull-request-24.patch and
  pull-request-25.patch.
- Ship an example of /etc/rabbitmq/rabbitmq-env.conf, as this is
  useful indication. It only contains commented examples, based on
  what the Debian package is doing.

OBS-URL: https://build.opensuse.org/request/show/485761
OBS-URL: https://build.opensuse.org/package/show/network:messaging:amqp/rabbitmq-server?expand=0&rev=76
2017-04-05 11:33:01 +00:00

51 lines
1.7 KiB
Diff

From 6d9a00d54425b299c682af692c9fad413d9f5da4 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@suse.com>
Date: Wed, 29 Mar 2017 21:44:32 +0200
Subject: [PATCH 1/2] OCF RA: Use rabbitmqctl_action wrapper for stop action
We want to use the wrapper function to call rabbitmqctl for stop, so
that we interpret correctly the exit code.
---
scripts/rabbitmq-server.ocf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/rabbitmq-server.ocf b/scripts/rabbitmq-server.ocf
index 804e654..284360b 100755
--- a/scripts/rabbitmq-server.ocf
+++ b/scripts/rabbitmq-server.ocf
@@ -299,7 +299,7 @@ rabbit_stop() {
return $OCF_SUCCESS
fi
- $RABBITMQ_CTL stop ${RABBITMQ_PID_FILE}
+ rabbitmqctl_action stop ${RABBITMQ_PID_FILE}
rc=$?
if [ "$rc" != 0 ]; then
From 3b9dcfc6653e7ae8e7ba9e2e738c9f7df30e5cce Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@suse.com>
Date: Wed, 29 Mar 2017 21:45:52 +0200
Subject: [PATCH 2/2] OCF RA: accept 1 as valid exit code from "rabbitmqctl
status"
It may return 1 if the server is not completely running yet, and we
don't want pacemaker to treat that as a complete unexpected error.
---
scripts/rabbitmq-server.ocf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/rabbitmq-server.ocf b/scripts/rabbitmq-server.ocf
index 284360b..bf8880d 100755
--- a/scripts/rabbitmq-server.ocf
+++ b/scripts/rabbitmq-server.ocf
@@ -256,7 +256,7 @@ rabbitmqctl_action() {
ocf_log debug "RabbitMQ server is running normally"
return $OCF_SUCCESS
;;
- 2)
+ 1|2)
ocf_log debug "RabbitMQ server is not running"
return $OCF_NOT_RUNNING
;;