|
|
0240e4 |
From 0edc762e63801b92b5a931c10446287f9b3d6406 Mon Sep 17 00:00:00 2001
|
|
|
0240e4 |
From: Andrew Beekhof <andrew@beekhof.net>
|
|
|
0240e4 |
Date: Wed, 6 Jan 2016 15:15:24 +1100
|
|
|
0240e4 |
Subject: [PATCH 107/108] Feature: PE: Honor the shutdown transient attributes
|
|
|
0240e4 |
for remote nodes
|
|
|
0240e4 |
|
|
|
0240e4 |
---
|
|
|
0240e4 |
lib/pengine/unpack.c | 11 +++++++++++
|
|
|
0240e4 |
1 file changed, 11 insertions(+)
|
|
|
0240e4 |
|
|
|
0240e4 |
diff --git a/lib/pengine/unpack.c b/lib/pengine/unpack.c
|
|
|
0240e4 |
index 6a125b0..75d9dd8 100644
|
|
|
0240e4 |
--- a/lib/pengine/unpack.c
|
|
|
0240e4 |
+++ b/lib/pengine/unpack.c
|
|
|
0240e4 |
@@ -1145,6 +1145,8 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set)
|
|
|
0240e4 |
{
|
|
|
0240e4 |
const char *id = NULL;
|
|
|
0240e4 |
const char *uname = NULL;
|
|
|
0240e4 |
+ const char *shutdown = NULL;
|
|
|
0240e4 |
+
|
|
|
0240e4 |
GListPtr gIter = NULL;
|
|
|
0240e4 |
|
|
|
0240e4 |
xmlNode *state = NULL;
|
|
|
0240e4 |
@@ -1190,6 +1192,15 @@ unpack_remote_status(xmlNode * status, pe_working_set_t * data_set)
|
|
|
0240e4 |
attrs = find_xml_node(state, XML_TAG_TRANSIENT_NODEATTRS, FALSE);
|
|
|
0240e4 |
add_node_attrs(attrs, this_node, TRUE, data_set);
|
|
|
0240e4 |
|
|
|
0240e4 |
+ shutdown = g_hash_table_lookup(this_node->details->attrs, XML_CIB_ATTR_SHUTDOWN);
|
|
|
0240e4 |
+ if (shutdown != NULL && safe_str_neq("0", shutdown)) {
|
|
|
0240e4 |
+ resource_t *rsc = this_node->details->remote_rsc;
|
|
|
0240e4 |
+
|
|
|
0240e4 |
+ crm_info("Node %s is shutting down", this_node->details->uname);
|
|
|
0240e4 |
+ this_node->details->shutdown = TRUE;
|
|
|
0240e4 |
+ rsc->next_role = RSC_ROLE_STOPPED;
|
|
|
0240e4 |
+ }
|
|
|
0240e4 |
+
|
|
|
0240e4 |
if (crm_is_true(g_hash_table_lookup(this_node->details->attrs, "standby"))) {
|
|
|
0240e4 |
crm_info("Node %s is in standby-mode", this_node->details->uname);
|
|
|
0240e4 |
this_node->details->standby = TRUE;
|
|
|
0240e4 |
--
|
|
|
0240e4 |
1.8.3.1
|
|
|
0240e4 |
|