Blame SOURCES/015-shutdown-lock.patch

308170
From d70d90367c898bcb62fd6c7dd8d641ca56be04ae Mon Sep 17 00:00:00 2001
308170
From: Ken Gaillot <kgaillot@redhat.com>
308170
Date: Fri, 20 Dec 2019 11:46:37 -0600
308170
Subject: [PATCH 11/18] Low: scheduler: display when a resource is
308170
 shutdown-locked to a node
308170
308170
... so it shows up in logs and cluster status displays
308170
---
308170
 lib/pengine/native.c | 6 ++++++
308170
 1 file changed, 6 insertions(+)
308170
308170
diff --git a/lib/pengine/native.c b/lib/pengine/native.c
308170
index b064115..5a6fd80 100644
308170
--- a/lib/pengine/native.c
308170
+++ b/lib/pengine/native.c
308170
@@ -541,6 +541,9 @@ native_output_string(pe_resource_t *rsc, const char *name, pe_node_t *node,
308170
         provider = crm_element_value(rsc->xml, XML_AGENT_ATTR_PROVIDER);
308170
     }
308170
 
308170
+    if ((node == NULL) && (rsc->lock_node != NULL)) {
308170
+        node = rsc->lock_node;
308170
+    }
308170
     if (is_set(options, pe_print_rsconly)
308170
         || pcmk__list_of_multiple(rsc->running_on)) {
308170
         node = NULL;
308170
@@ -583,6 +586,9 @@ native_output_string(pe_resource_t *rsc, const char *name, pe_node_t *node,
308170
     if (node && !(node->details->online) && node->details->unclean) {
308170
         have_flags = add_output_flag(outstr, "UNCLEAN", have_flags);
308170
     }
308170
+    if (node && (node == rsc->lock_node)) {
308170
+        have_flags = add_output_flag(outstr, "LOCKED", have_flags);
308170
+    }
308170
     if (is_set(options, pe_print_pending)) {
308170
         const char *pending_task = native_pending_task(rsc);
308170
 
308170
-- 
308170
1.8.3.1
308170