Blame SOURCES/shutdown-lock-06.patch

af918f
From f629c2de1d011e8ed7a3f1d14811681672f424d5 Mon Sep 17 00:00:00 2001
af918f
From: Ken Gaillot <kgaillot@redhat.com>
af918f
Date: Thu, 16 Jan 2020 12:34:21 -0600
af918f
Subject: [PATCH 06/10] Low: scheduler: display when a resource is
af918f
 shutdown-locked to a node
af918f
af918f
... so it shows up in logs and cluster status displays
af918f
---
af918f
 lib/pengine/native.c | 7 +++++++
af918f
 1 file changed, 7 insertions(+)
af918f
af918f
diff --git a/lib/pengine/native.c b/lib/pengine/native.c
af918f
index 3c9f8f5..c66cada 100644
af918f
--- a/lib/pengine/native.c
af918f
+++ b/lib/pengine/native.c
af918f
@@ -538,6 +538,9 @@ common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *n
af918f
         return;
af918f
     }
af918f
 
af918f
+    if ((node == NULL) && (rsc->lock_node != NULL)) {
af918f
+        node = rsc->lock_node;
af918f
+    }
af918f
     if ((options & pe_print_rsconly) || g_list_length(rsc->running_on) > 1) {
af918f
         node = NULL;
af918f
     }
af918f
@@ -593,6 +596,10 @@ common_print(resource_t * rsc, const char *pre_text, const char *name, node_t *n
af918f
             flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset,
af918f
                                    "%sUNCLEAN", comma_if(flagOffset));
af918f
         }
af918f
+        if (node == rsc->lock_node) {
af918f
+            flagOffset += snprintf(flagBuffer + flagOffset, LINE_MAX - flagOffset,
af918f
+                                   "%sLOCKED", comma_if(flagOffset));
af918f
+        }
af918f
     }
af918f
 
af918f
     if (options & pe_print_pending) {
af918f
-- 
af918f
1.8.3.1
af918f