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