File pacemaker#3409-0005-Fix-tools-honor-rules-when-getting-utilization-attri.patch of Package pacemaker.34782
From ccd09841c87dda32e83d65a661f9184809db824e Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Thu, 14 Mar 2024 17:50:25 -0500
Subject: [PATCH 5/7] Fix: tools: honor rules when getting utilization
attributes with crm_resource
---
tools/crm_resource_print.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: pacemaker-2.0.5+20201202.ba59be712/tools/crm_resource_print.c
===================================================================
--- pacemaker-2.0.5+20201202.ba59be712.orig/tools/crm_resource_print.c
+++ pacemaker-2.0.5+20201202.ba59be712/tools/crm_resource_print.c
@@ -304,8 +304,13 @@ cli_resource_print_attribute(pe_resource
get_meta_attributes(params, rsc, NULL, data_set);
} else {
- pe__unpack_dataset_nvpairs(rsc->xml, XML_TAG_UTILIZATION, NULL, params,
- NULL, FALSE, data_set);
+ pe_rule_eval_data_t rule_data = {
+ .now = data_set->now,
+ };
+
+ pe__unpack_dataset_nvpairs(rsc->xml, XML_TAG_UTILIZATION,
+ &rule_data, params, NULL, FALSE,
+ data_set);
}
crm_debug("Looking up %s in %s", attr, rsc->id);