Skip to content

Commit 666a411

Browse files
committed
Fix: pacemaker-attrd: remember names of peers from attribute update in case unknown
... in the membership cache, so that we also learn names of non-writers as early as possible through processing `sync-response` from the writer. Regression introduced by 85d7a70 (not yet released).
1 parent 5f643a4 commit 666a411

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

daemons/attrd/attrd_corosync.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,13 @@ update_attr_on_host(attribute_t *a, const pcmk__node_status_t *peer,
325325
// Remember node's XML ID if we're just learning it
326326
if ((node_xml_id != NULL)
327327
&& !pcmk__str_eq(node_xml_id, prev_xml_id, pcmk__str_none)) {
328+
// Remember node's name in case unknown in the membership cache
329+
pcmk__node_status_t *known_peer =
330+
pcmk__get_node(0, host, node_xml_id,
331+
pcmk__node_search_cluster_member);
332+
328333
crm_trace("Learned %s[%s] node XML ID is %s (was %s)",
329-
a->id, v->nodename, node_xml_id,
334+
a->id, known_peer->name, node_xml_id,
330335
pcmk__s(prev_xml_id, "unknown"));
331336
attrd_set_node_xml_id(v->nodename, node_xml_id);
332337
if (attrd_election_won()) {

0 commit comments

Comments
 (0)