File pacemaker#3409-0007-Log-scheduler-log-unknown-nodes-in-location-constrai.patch of Package pacemaker.36799

From 723be0bc814a66e27aea34d86f1dc7eaebc90cee Mon Sep 17 00:00:00 2001
From: Ken Gaillot <kgaillot@redhat.com>
Date: Wed, 20 Mar 2024 15:33:24 -0500
Subject: [PATCH 7/7] Log: scheduler: log unknown nodes in location constraints

Fixes T784 (CLBZ#5415)
---
 lib/pacemaker/pcmk_sched_location.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: pacemaker-2.1.7+20231219.0f7f88312/lib/pacemaker/pcmk_sched_location.c
===================================================================
--- pacemaker-2.1.7+20231219.0f7f88312.orig/lib/pacemaker/pcmk_sched_location.c
+++ pacemaker-2.1.7+20231219.0f7f88312/lib/pacemaker/pcmk_sched_location.c
@@ -222,7 +222,10 @@ unpack_rsc_location(xmlNode *xml_obj, pc
         int score_i = char2score(score);
         pcmk_node_t *match = pe_find_node(rsc->cluster->nodes, node);
 
-        if (!match) {
+        if (match == NULL) {
+            crm_info("Ignoring location constraint %s "
+                     "because '%s' is not a known node",
+                     pcmk__s(id, "without ID"), node);
             return;
         }
         location = pcmk__new_location(id, rsc, score_i, discovery, match);
openSUSE Build Service is sponsored by