File pacemaker-pengine-guest-node-unclean-if-host-unclean.patch of Package pacemaker.8397
commit b7ce740edf3d71fcccead2288bf0ab11037f9672
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Wed Nov 23 14:56:29 2016 -0600
Fix: pengine: consider guest node unclean if its host is unclean
Index: pacemaker/lib/pengine/unpack.c
===================================================================
--- pacemaker.orig/lib/pengine/unpack.c
+++ pacemaker/lib/pengine/unpack.c
@@ -1400,6 +1400,7 @@ determine_remote_online_status(pe_workin
{
resource_t *rsc = this_node->details->remote_rsc;
resource_t *container = NULL;
+ pe_node_t *host = NULL;
/* If there is a node state entry for a (former) Pacemaker Remote node
* but no resource creating that node, the node's connection resource will
@@ -1412,6 +1413,10 @@ determine_remote_online_status(pe_workin
container = rsc->container;
+ if (container && (g_list_length(rsc->running_on) == 1)) {
+ host = rsc->running_on->data;
+ }
+
/* If the resource is currently started, mark it online. */
if (rsc->role == RSC_ROLE_STARTED) {
crm_trace("Remote node %s is set to ONLINE. role == started", this_node->details->id);
@@ -1440,6 +1445,13 @@ determine_remote_online_status(pe_workin
crm_trace("Remote node %s is set to OFFLINE. node is stopped.", this_node->details->id);
this_node->details->online = FALSE;
this_node->details->remote_requires_reset = FALSE;
+
+ } else if (host && (host->details->online == FALSE)
+ && host->details->unclean) {
+ crm_trace("Guest node %s UNCLEAN because host is unclean",
+ this_node->details->id);
+ this_node->details->online = FALSE;
+ this_node->details->remote_requires_reset = TRUE;
}
remote_online_done: