File bsc#1239629-0008-Fix-pacemaker-attrd-make-a-peer-learn-our-node-name-.patch of Package pacemaker.38493

From 2b3333adb1681562a5aed2256ba2a5e6a3c95904 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Fri, 21 Mar 2025 16:03:41 +0100
Subject: [PATCH 8/8] Fix: pacemaker-attrd: make a peer learn our node name
 once it has joined

... by sending it a protocol message.

This is an additional assurance besides the way of learning non-writers'
names through processing `sync-response` from the writer as of
8d74176798.
---
 daemons/attrd/attrd_corosync.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Index: pacemaker-2.1.7+20231219.0f7f88312/daemons/attrd/attrd_corosync.c
===================================================================
--- pacemaker-2.1.7+20231219.0f7f88312.orig/daemons/attrd/attrd_corosync.c
+++ pacemaker-2.1.7+20231219.0f7f88312/daemons/attrd/attrd_corosync.c
@@ -235,10 +235,16 @@ attrd_peer_change_cb(enum crm_status_typ
                 /* If we're the writer, send new peers a list of all attributes
                  * (unless it's a remote node, which doesn't run its own attrd)
                  */
-                if (attrd_election_won()
-                    && !pcmk_is_set(peer->flags, crm_remote_node)) {
-                    attrd_peer_sync(peer, NULL);
+                if (!is_remote) {
+                   if (attrd_election_won()) {
+                       attrd_peer_sync(peer, NULL);
+
+                   } else {
+                       // Anyway send a message so that the peer learns our name
+                       attrd_send_protocol(peer);
+                   }
                 }
+
             } else {
                 // Remove all attribute values associated with lost nodes
                 if (peer->uname != NULL) {
openSUSE Build Service is sponsored by