|
|
05afe3 |
From 2dbfbd8ee3c1547f941507ab4109aa04eec0ef5a Mon Sep 17 00:00:00 2001
|
|
|
05afe3 |
From: Michele Baldessari <michele@acksyn.org>
|
|
|
05afe3 |
Date: Mon, 16 Jul 2018 20:24:04 +0200
|
|
|
05afe3 |
Subject: [PATCH] Do not call ocf_attribute_target in the meta-data function
|
|
|
05afe3 |
|
|
|
05afe3 |
Starting with pacemaker-1.1.19 a "crm_node -n" call triggers
|
|
|
05afe3 |
a CRM_OP_NODE_INFO cluster operation. If this is called
|
|
|
05afe3 |
from a bundle with 1.1.19 code (or later) running on a 1.1.18
|
|
|
05afe3 |
cluster, during a meta-data call we will get the following error in the
|
|
|
05afe3 |
cluster logs:
|
|
|
05afe3 |
Jul 14 11:35:27 [20041] controller-0 crmd: error: handle_request: Unexpected request (node-info) sent to non-DC node
|
|
|
05afe3 |
Jul 14 11:35:27 [20041] controller-0 crmd: error: handle_request: Unexpected <create_request_adv origin="send_node_info_request" t="crmd" version="3.0.14" subt="request" reference="node-info-crm_node-1531568127-1" crm_task="node-info" crm_sys_to="crmd" crm_sys_from="e67698a2-6f50-45fc-b8de-423c94e11c99" acl_target="root" crm_user="root" src="controller-0"/>
|
|
|
05afe3 |
|
|
|
05afe3 |
By not calling ocf_attribute_target (which triggers a crm_node -n
|
|
|
05afe3 |
call) when polling for meta-data we do not run into this issue.
|
|
|
05afe3 |
|
|
|
05afe3 |
This can easily get triggered when creating a resource invoking
|
|
|
05afe3 |
crm_node -n inside a 1.1.19 container with pcs, as that invokes
|
|
|
05afe3 |
the 'meta-data' action explicitely.
|
|
|
05afe3 |
|
|
|
05afe3 |
Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
|
|
|
05afe3 |
Suggested-By: Ken Gaillot <kgaillot@redhat.com>
|
|
|
05afe3 |
---
|
|
|
05afe3 |
heartbeat/galera | 6 ++++--
|
|
|
05afe3 |
heartbeat/rabbitmq-cluster | 4 +++-
|
|
|
05afe3 |
heartbeat/redis.in | 4 +++-
|
|
|
05afe3 |
3 files changed, 10 insertions(+), 4 deletions(-)
|
|
|
05afe3 |
|
|
|
05afe3 |
diff --git a/heartbeat/galera b/heartbeat/galera
|
|
|
05afe3 |
index 270bdaf1b..4f341ceef 100755
|
|
|
05afe3 |
--- a/heartbeat/galera
|
|
|
05afe3 |
+++ b/heartbeat/galera
|
|
|
05afe3 |
@@ -66,9 +66,11 @@
|
|
|
05afe3 |
|
|
|
05afe3 |
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
|
|
|
05afe3 |
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
|
|
|
05afe3 |
-. ${OCF_FUNCTIONS_DIR}/mysql-common.sh
|
|
|
05afe3 |
|
|
|
05afe3 |
-NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+if [ "$__OCF_ACTION" != "meta-data" ]; then
|
|
|
05afe3 |
+ . ${OCF_FUNCTIONS_DIR}/mysql-common.sh
|
|
|
05afe3 |
+ NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+fi
|
|
|
05afe3 |
|
|
|
05afe3 |
# It is common for some galera instances to store
|
|
|
05afe3 |
# check user that can be used to query status
|
|
|
05afe3 |
diff --git a/heartbeat/rabbitmq-cluster b/heartbeat/rabbitmq-cluster
|
|
|
05afe3 |
index 9ff49e075..54a16c941 100755
|
|
|
05afe3 |
--- a/heartbeat/rabbitmq-cluster
|
|
|
05afe3 |
+++ b/heartbeat/rabbitmq-cluster
|
|
|
05afe3 |
@@ -37,7 +37,9 @@ RMQ_DATA_DIR="/var/lib/rabbitmq/mnesia"
|
|
|
05afe3 |
RMQ_PID_DIR="/var/run/rabbitmq"
|
|
|
05afe3 |
RMQ_PID_FILE="/var/run/rabbitmq/rmq.pid"
|
|
|
05afe3 |
RMQ_LOG_DIR="/var/log/rabbitmq"
|
|
|
05afe3 |
-NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+if [ "$__OCF_ACTION" != "meta-data" ]; then
|
|
|
05afe3 |
+ NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+fi
|
|
|
05afe3 |
|
|
|
05afe3 |
# this attr represents the current active local rmq node name.
|
|
|
05afe3 |
# when rmq stops or the node is fenced, this attr disappears
|
|
|
05afe3 |
diff --git a/heartbeat/redis.in b/heartbeat/redis.in
|
|
|
05afe3 |
index d5eb8f664..ddc62d8a7 100644
|
|
|
05afe3 |
--- a/heartbeat/redis.in
|
|
|
05afe3 |
+++ b/heartbeat/redis.in
|
|
|
05afe3 |
@@ -664,7 +664,9 @@ redis_validate() {
|
|
|
05afe3 |
fi
|
|
|
05afe3 |
}
|
|
|
05afe3 |
|
|
|
05afe3 |
-NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+if [ "$__OCF_ACTION" != "meta-data" ]; then
|
|
|
05afe3 |
+ NODENAME=$(ocf_attribute_target)
|
|
|
05afe3 |
+fi
|
|
|
05afe3 |
if [ -r "$REDIS_CONFIG" ]; then
|
|
|
05afe3 |
clientpasswd="$(sed -n -e 's/^\s*requirepass\s*\(.*\)\s*$/\1/p' < $REDIS_CONFIG | tail -n 1)"
|
|
|
05afe3 |
fi
|