Dirk Mueller
ba4a22848a
- 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
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 9bd1b0a5f3e421823aaf7ef243ebe9c5d30b7855 Mon Sep 17 00:00:00 2001
|
|
From: Vincent Untz <vuntz@suse.com>
|
|
Date: Fri, 31 Mar 2017 13:23:00 +0200
|
|
Subject: [PATCH] OCF RA: Don't hardcode primitive name in
|
|
rabbitmq-server-ha.ocf
|
|
|
|
We can compute the name of the primitive automatically from environment
|
|
variables, instead of hard-coding p_rabbitmq-server; this makes the
|
|
resource agent more flexible.
|
|
|
|
Closes https://github.com/rabbitmq/rabbitmq-server-release/issues/23
|
|
---
|
|
scripts/rabbitmq-server-ha.ocf | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf
|
|
index 49f3af7..81fe19b 100755
|
|
--- a/scripts/rabbitmq-server-ha.ocf
|
|
+++ b/scripts/rabbitmq-server-ha.ocf
|
|
@@ -89,6 +89,7 @@ OCF_RESKEY_command_timeout_default=""
|
|
: ${OCF_RESKEY_command_timeout=${OCF_RESKEY_command_timeout_default}}
|
|
TIMEOUT_ARG=$((OCF_RESKEY_CRM_meta_timeout / 6000 + 30))
|
|
COMMAND_TIMEOUT="/usr/bin/timeout ${OCF_RESKEY_command_timeout} ${TIMEOUT_ARG}"
|
|
+RESOURCE_NAME=`echo $OCF_RESOURCE_INSTANCE | cut -d ":" -f 1`
|
|
|
|
#######################################################################
|
|
|
|
@@ -654,7 +655,7 @@ get_node_start_time() {
|
|
}
|
|
|
|
get_node_master_score() {
|
|
- get_integer_node_attr $1 'master-p_rabbitmq-server'
|
|
+ get_integer_node_attr $1 "master-${RESOURCE_NAME}"
|
|
}
|
|
|
|
# Return either rabbit node name as FQDN or shortname, depends on the OCF_RESKEY_use_fqdn.
|