<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:-webkit-standard;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Aptos",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Usually formation of a new cluster (DC selection) is quite fast and it should be finished before a fenced node is restarted.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thinks may be different if the node isn’t actually fenced, however.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Why would all nodes loose the network when one node is fenced?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Segoe UI",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Ulrich Windl<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Users <users-bounces@clusterlabs.org>
<b>On Behalf Of </b>Michael Riexinger via Users<br>
<b>Sent:</b> Tuesday, November 3, 2026 10:16 AM<br>
<b>To:</b> users@clusterlabs.org<br>
<b>Cc:</b> Michael Riexinger <michael.riexinger@de.clara.net><br>
<b>Subject:</b> [EXT] [EXT] [ClusterLabs] [Pacemaker] DC syncs CIB from a node it just fenced: 30 s recovery delay, next join rejected<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I'd like to report what looks like a race in the controller's join handling. Bugzilla is<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">under maintenance right now, so I'm sending it here; I'm happy to file it there once it's<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">back up.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Summary<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">The DC finalizes a join by syncing the CIB from a node it has just fenced. Recovery is<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">delayed by 30 s, and the fenced node's next join is rejected ("failed to sync its CIB"),<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">so it gets fenced a second time.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Versions<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">--------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Pacemaker 3.0.0 (Debian 13 package 3.0.0-2), corosync 3.1.9, corosync-qdevice 3.0.3<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">(net, ffsplit), sbd 1.5.2 (watchdog only). The code involved looks unchanged in 2.1.6,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">3.0.1 and current main.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Setup<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-----<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Two nodes plus a quorum device. Fencing level 1 powers the node off through the cloud API<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">(pcmk_reboot_action=off); level 2 is watchdog SBD.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">What happens<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">1. All nodes lose the network for about 7 s.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">2. Node 1 (DC) keeps quorum through the quorum device and fences node 2.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">3. While the fence is in flight, the network returns and node 2 rejoins the corosync<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   membership.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">4. The DC delays the join until the fence completes. It then finalizes the join by syncing<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   the CIB *from node 2*, which is powered off by then.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">5. The sync times out after 30 s. Only then does the DC hold a new election and start the<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   resources.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">6. When node 2 is started again later, the DC rejects its join because the earlier sync<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   failed. Node 2 leaves and is fenced a second time. The start after that joins normally.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Reproduced in 1 of 3 runs with a 7 s outage of all nodes. It needs the network to return<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">while the fence is in flight.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">DC journal (UTC, node 2 = gw-2)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:33.525 pacemaker-controld: notice: Requesting fencing (reboot) targeting node gw-2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:34.342 corosync [TOTEM ] A new membership (1.4f) was formed. Members joined: 2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:38.870 pacemaker-controld: warning: Delaying join-2 finalization while transition in progress<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:43.204 pacemaker-based: notice: Node gw-2 state is now lost<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:46.781 pacemaker-fenced: notice: Operation 'reboot' targeting gw-2 by gw-1 for pacemaker-controld@gw-1: OK (Done)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:47:46.782 pacemaker-controld: notice: Finalizing join-2 for 1 node (sync'ing CIB from gw-2)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:48:16.735 pacemaker-controld: error: Could not sync CIB from gw-2 in join-2: Timer expired<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:48:16.735 pacemaker-controld: warning: Input I_ELECTION_DC received in state S_FINALIZE_JOIN from finalize_sync_callback<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:48:16.760 pacemaker-schedulerd: notice: Actions: Start ... (resources start only now)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:51:44.756 pacemaker-controld: error: Rejecting join-3 request from node gw-2 because we failed to sync its CIB in join-2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">15:51:46.800 pacemaker-controld: notice: Requesting fencing (reboot) targeting node gw-2<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Code pointers (main at d981f262f81644d9faad4fe6be158401fdb53bf8)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-----------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">1. The sync source is chosen at offer time and never revalidated.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   do_dc_join_filter_offer() stores the node with the newest CIB in max_generation_from<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   (daemons/controld/controld_join_dc.c L542, L568). In our case that was gw-2, whose join<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   offer arrived right after it rejoined.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   https://github.com/ClusterLabs/pacemaker/blob/d981f262f81644d9faad4fe6be158401fdb53bf8/daemons/controld/controld_join_dc.c#L542<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">2. Finalization resumes after the fencing transition with the stale source.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   do_dc_join_finalize() stalls while the transition (the fence of gw-2) runs (L634-L639).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   When it resumes, it only checks whether max_generation_from is the local node<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   (L628-L632), not whether that node is still an active member, and calls sync_from() on<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   a node that is powered off (L668-L671).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   https://github.com/ClusterLabs/pacemaker/blob/d981f262f81644d9faad4fe6be158401fdb53bf8/daemons/controld/controld_join_dc.c#L628-L671<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">3. The 30 s come from the CIB call timeout.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   cib_op_timeout() is max(10 s x (nodes + 1), MIN_CIB_OP_TIMEOUT = 30)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   (daemons/controld/controld_cib.c L203, L214-L220), so 30 s for two nodes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">4. The failure is recorded after the node has already left.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   finalize_sync_callback() calls record_failed_sync_node() for gw-2 (controld_join_dc.c<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   L694). The only removals are in peer_update_callback(), when a node changes away from<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   member (L175) or loses its controller process (L214)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   (daemons/controld/controld_callbacks.c). Both had already happened for gw-2 at<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   15:47:43, before the entry was recorded at 15:48:16.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   https://github.com/ClusterLabs/pacemaker/blob/d981f262f81644d9faad4fe6be158401fdb53bf8/daemons/controld/controld_callbacks.c#L175<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">5. The stale entry rejects the next join.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   do_dc_join_filter_offer() rejects gw-2 on its next join (controld_join_dc.c L486-L490).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   The rejection makes gw-2 leave, which removes the entry, so the join after that<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   succeeds.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Expected<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">--------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">1. A node that is being fenced, or has just been fenced, in the current transition is never<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   chosen as the CIB sync source.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">2. A failed sync from a node that has already left does not cause its next join to be<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">   rejected.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Possible directions<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">-------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">- When finalization resumes, check that max_generation_from is still an active member. If<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">  it is not, restart the join or fall back to the local CIB.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">- Clear max_generation_from (or restart the join) when that node is lost or fenced during<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">  the join.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">- Do not record a failed sync for a node that is no longer active, or clear its entry when<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">  its fencing succeeds.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Impact<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Resources start 30 s later than necessary. After a restart, the fenced node is fenced once<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">more, so automated recovery needs two attempts. No data was at risk in our tests.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">A note on a fix<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">---------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I would have liked to send a patch for this myself. However, the code analysis above was<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">done with the help of an AI assistant, and under the ClusterLabs AI policy<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">(https://github.com/ClusterLabs/ai-policies) AI-assisted code is not accepted. So I'm<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">leaving the fix to you and providing the analysis instead. The test setup and the logs are<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">ours, and I checked the findings against the source. I can rerun the scenario or collect<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">more logs (crm_report, full journals) if that helps.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<div id="ms-outlook-mobile-signature">
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"-webkit-standard",serif;color:black">Best regards</span><span style="font-size:12.0pt;color:black"><br>
<br>
</span><span style="font-size:12.0pt;font-family:"-webkit-standard",serif;color:black">Michael Riexinger</span><span style="font-size:12.0pt;color:black"><br>
Head of Cloud Infrastructure Engineering<br>
</span><span style="font-size:12.0pt;font-family:"-webkit-standard",serif">—  </span><span style="font-size:12.0pt;color:black"><br>
Claranet GmbH<br>
Hanauer Landstraße 196<br>
60314 Frankfurt am Main<br>
<br>
<a href="https://www.claranet.com/de/">https://www.claranet.com/de</a><br>
<br>
<br>
Sitz der Gesellschaft: Frankfurt am Main, Deutschland<br>
Geschäftsführer Sebastian Vögel, Olaf Fischer<br>
HRB 50381 AG Frankfurt am Main<br>
Vat-ID DE812918694<br>
<br>
Claranet nimmt den Schutz Ihrer personenbezogenen Daten sehr ernst und hält sich strikt an die Regeln der Datenschutzgesetze.<br>
Näheres entnehmen Sie bitte unserer Datenschutzerklärung: <a href="https://www.claranet.com/de/datenschutz">
https://www.claranet.com/de/datenschutz</a></span><span style="font-size:12.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>