From d70d90367c898bcb62fd6c7dd8d641ca56be04ae Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Fri, 20 Dec 2019 11:46:37 -0600 Subject: [PATCH 11/18] 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pengine/native.c b/lib/pengine/native.c index b064115..5a6fd80 100644 --- a/lib/pengine/native.c +++ b/lib/pengine/native.c @@ -541,6 +541,9 @@ native_output_string(pe_resource_t *rsc, const char *name, pe_node_t *node, provider = crm_element_value(rsc->xml, XML_AGENT_ATTR_PROVIDER); } + if ((node == NULL) && (rsc->lock_node != NULL)) { + node = rsc->lock_node; + } if (is_set(options, pe_print_rsconly) || pcmk__list_of_multiple(rsc->running_on)) { node = NULL; @@ -583,6 +586,9 @@ native_output_string(pe_resource_t *rsc, const char *name, pe_node_t *node, if (node && !(node->details->online) && node->details->unclean) { have_flags = add_output_flag(outstr, "UNCLEAN", have_flags); } + if (node && (node == rsc->lock_node)) { + have_flags = add_output_flag(outstr, "LOCKED", have_flags); + } if (is_set(options, pe_print_pending)) { const char *pending_task = native_pending_task(rsc); -- 1.8.3.1