summaryrefslogtreecommitdiffstats
path: root/daemons/attrd/attrd_elections.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemons/attrd/attrd_elections.c')
-rw-r--r--daemons/attrd/attrd_elections.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/daemons/attrd/attrd_elections.c b/daemons/attrd/attrd_elections.c
index 3b6b55a..82fbe8a 100644
--- a/daemons/attrd/attrd_elections.c
+++ b/daemons/attrd/attrd_elections.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2022 the Pacemaker project contributors
+ * Copyright 2013-2023 the Pacemaker project contributors
*
* The version control history for this file may have further details.
*
@@ -25,9 +25,11 @@ attrd_election_cb(gpointer user_data)
/* Update the peers after an election */
attrd_peer_sync(NULL, NULL);
- /* Update the CIB after an election */
- attrd_write_attributes(true, false);
- return FALSE;
+ /* After winning an election, update the CIB with the values of all
+ * attributes as the winner knows them.
+ */
+ attrd_write_attributes(attrd_write_all);
+ return G_SOURCE_REMOVE;
}
void
@@ -48,7 +50,7 @@ attrd_start_election_if_needed(void)
{
if ((peer_writer == NULL)
&& (election_state(writer) != election_in_progress)
- && !attrd_shutting_down()) {
+ && !attrd_shutting_down(false)) {
crm_info("Starting an election to determine the writer");
election_vote(writer);
@@ -70,7 +72,7 @@ attrd_handle_election_op(const crm_node_t *peer, xmlNode *xml)
crm_xml_add(xml, F_CRM_HOST_FROM, peer->uname);
// Don't become writer if we're shutting down
- rc = election_count_vote(writer, xml, !attrd_shutting_down());
+ rc = election_count_vote(writer, xml, !attrd_shutting_down(false));
switch(rc) {
case election_start: