|
|
ed4e54 |
From 457e231256feb0bdcf206209e03f0875f50d03b3 Mon Sep 17 00:00:00 2001
|
|
|
ed4e54 |
From: Ken Gaillot <kgaillot@redhat.com>
|
|
|
ed4e54 |
Date: Tue, 14 Jan 2020 16:24:08 -0600
|
|
|
ed4e54 |
Subject: [PATCH 14/18] Low: tools: for down nodes, crm_resource --refresh
|
|
|
ed4e54 |
should clear CIB only
|
|
|
ed4e54 |
|
|
|
ed4e54 |
This provides a mechanism to manually clear shutdown locks.
|
|
|
ed4e54 |
---
|
|
|
ed4e54 |
tools/crm_resource_runtime.c | 16 +++++++++++++---
|
|
|
ed4e54 |
1 file changed, 13 insertions(+), 3 deletions(-)
|
|
|
ed4e54 |
|
|
|
ed4e54 |
diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c
|
|
|
ed4e54 |
index ed5fb03..e89b572 100644
|
|
|
ed4e54 |
--- a/tools/crm_resource_runtime.c
|
|
|
ed4e54 |
+++ b/tools/crm_resource_runtime.c
|
|
|
ed4e54 |
@@ -473,6 +473,7 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op,
|
|
|
ed4e54 |
const char *rsc_type = NULL;
|
|
|
ed4e54 |
xmlNode *params = NULL;
|
|
|
ed4e54 |
xmlNode *msg_data = NULL;
|
|
|
ed4e54 |
+ bool cib_only = false;
|
|
|
ed4e54 |
resource_t *rsc = pe_find_resource(data_set->resources, rsc_id);
|
|
|
ed4e54 |
|
|
|
ed4e54 |
if (rsc == NULL) {
|
|
|
ed4e54 |
@@ -504,10 +505,14 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op,
|
|
|
ed4e54 |
}
|
|
|
ed4e54 |
|
|
|
ed4e54 |
if (!(node->details->online)) {
|
|
|
ed4e54 |
- CMD_ERR("Node %s is not online", host_uname);
|
|
|
ed4e54 |
- return -ENOTCONN;
|
|
|
ed4e54 |
+ if (strcmp(op, CRM_OP_LRM_DELETE) == 0) {
|
|
|
ed4e54 |
+ cib_only = true;
|
|
|
ed4e54 |
+ } else {
|
|
|
ed4e54 |
+ CMD_ERR("Node %s is not online", host_uname);
|
|
|
ed4e54 |
+ return -ENOTCONN;
|
|
|
ed4e54 |
+ }
|
|
|
ed4e54 |
}
|
|
|
ed4e54 |
- if (pe__is_guest_or_remote_node(node)) {
|
|
|
ed4e54 |
+ if (!cib_only && pe__is_guest_or_remote_node(node)) {
|
|
|
ed4e54 |
node = pe__current_node(node->details->remote_rsc);
|
|
|
ed4e54 |
if (node == NULL) {
|
|
|
ed4e54 |
CMD_ERR("No cluster connection to Pacemaker Remote node %s detected",
|
|
|
ed4e54 |
@@ -533,6 +538,11 @@ send_lrm_rsc_op(crm_ipc_t * crmd_channel, const char *op,
|
|
|
ed4e54 |
crm_xml_add(msg_data, XML_LRM_ATTR_ROUTER_NODE, router_node);
|
|
|
ed4e54 |
}
|
|
|
ed4e54 |
|
|
|
ed4e54 |
+ if (cib_only) {
|
|
|
ed4e54 |
+ // Indicate that only the CIB needs to be cleaned
|
|
|
ed4e54 |
+ crm_xml_add(msg_data, PCMK__XA_MODE, XML_TAG_CIB);
|
|
|
ed4e54 |
+ }
|
|
|
ed4e54 |
+
|
|
|
ed4e54 |
xml_rsc = create_xml_node(msg_data, XML_CIB_TAG_RESOURCE);
|
|
|
ed4e54 |
if (rsc->clone_name) {
|
|
|
ed4e54 |
crm_xml_add(xml_rsc, XML_ATTR_ID, rsc->clone_name);
|
|
|
ed4e54 |
--
|
|
|
ed4e54 |
1.8.3.1
|
|
|
ed4e54 |
|