<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:19086737;
        mso-list-template-ids:1641473640;}
@list l1
        {mso-list-id:2008750193;
        mso-list-type:hybrid;
        mso-list-template-ids:-4191214 68747279 68747289 68747291 68747279 68747289 68747291 68747279 68747289 68747291;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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=RU link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you a lot for your thoughts. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Guess, I should clarify our way. I do not configuration, but my code do. It is python-based agent, connected to specific management system. When it receives configuration, it should complete sync action between configuration received and current resource configuration, it works as reflection of management system XML notation to CIB XML notation. Theoretically, it is possible to calculate step-by step changes and build a sequence of shell commands, but it takes more time to code and then it takes more time to apply. AFAIK, What CRM shell do is just edit CIB, so it seems like no difference. And my approach sounds more straight for coding unless CIB schema changes.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Chained resources may bring problems just because pacemaker only use one and latest CIB version, if I delete several resource chains from CIB and push, it will just stop resource randomly without respect to former constraints which are not in latest CIB. And this is behavior by design. To workaround this, I split deletion for steps: 1) keep resources and constraints in CIB, but set target state “stopped” and push 2)check state until every stopped 3) remove all of them from CIB and push. And this works fine!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>My question was raised by idea that probably I need no to wait for all stops, removing step2. If step 1 queue tasks to stop with proper sequencing, the second push should not affect the tasks in queue and resource down sequence should be kept. IMHO, this comes from pacemaker architecture as id described in the docs.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I am looking for someone who can confirm my guess or decline it.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Sincerely,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Alex<o:p></o:p></span></p><p class=MsoNormal><span lang=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='mso-ligatures:none;mso-fareast-language:RU'>From:</span></b><span style='mso-ligatures:none;mso-fareast-language:RU'> Users <users-bounces@clusterlabs.org> <b>On Behalf Of </b>Windl, Ulrich<br><b>Sent:</b> Friday, December 19, 2025 10:17 AM<br><b>To:</b> Cluster Labs - All topics related to open-source clustering welcomed <users@clusterlabs.org><br><b>Subject:</b> Re: [ClusterLabs] [EXT] Action scheduling on cib change<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=DE style='font-family:"Aptos",sans-serif;color:#1F497D'>Hi!<o:p></o:p></span></p><p class=MsoNormal><span lang=DE style='font-family:"Aptos",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Aptos",sans-serif;color:#1F497D'>IMHO there are better ways to do configuration changes than editing the CIB; I prefer the crm shell.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Aptos",sans-serif;color:#1F497D'>It’s also good for documentation.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Aptos",sans-serif;color:#1F497D'>Regarding the other question, I would never start a new configuration change when the CRM is not in “idle” state.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Aptos",sans-serif;color:#1F497D'>Mostly because debugging is hard when something goes wrong under such circumstances.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Aptos",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=DE style='color:#1F497D;mso-ligatures:none'>Kind regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=DE style='color:#1F497D;mso-ligatures:none'>Ulrich Windl<o:p></o:p></span></p></div><p class=MsoNormal><span lang=DE><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 lang=DE style='mso-ligatures:none;mso-fareast-language:DE'>From:</span></b><span lang=DE style='mso-ligatures:none;mso-fareast-language:DE'> Users <<a href="mailto:users-bounces@clusterlabs.org">users-bounces@clusterlabs.org</a>> <b>On Behalf Of </b><a href="mailto:alexey@pavlyuts.ru">alexey@pavlyuts.ru</a><br><b>Sent:</b> Friday, December 12, 2025 9:56 PM<br><b>To:</b> <a href="mailto:users@clusterlabs.org">users@clusterlabs.org</a><br><b>Subject:</b> [EXT] [ClusterLabs] Action scheduling on cib change<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=DE><o:p> </o:p></span></p><div style='border:solid black 1.0pt;padding:0cm 0cm 0cm 0cm'><p style='background:#FFF3CD'><span style='font-size:9.0pt;font-family:"Arial",sans-serif;color:black'>Sicherheits-Hinweis: Diese E-Mail wurde von einer Person außerhalb des UKR gesendet. Seien Sie vorsichtig vor gefälschten Absendern, wenn Sie auf Links klicken, Anhänge öffnen oder weitere Aktionen ausführen, bevor Sie die Echtheit überprüft haben.</span><o:p></o:p></p></div><p class=MsoNormal><span lang=EN-US>Hi All,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>We use pacemaker as cluster engine under the hood and manage it by getting CIB, change and then put. I can do a lot of changes at once.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The question is about internal action scheduler. As I found, the logic of applying new config sounds like:<o:p></o:p></span></p><ol style='margin-top:0cm' start=1 type=1><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo3'><span lang=EN-US>Validate, analyze new config, build target resource layout with respect to config, location constraints and current state<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo3'><span lang=EN-US>Build action list for resource state change with respect to order constraints<o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo3'><span lang=EN-US>Schedule actions into queue <o:p></o:p></span></li><li class=MsoListParagraph style='margin-left:0cm;mso-list:l1 level1 lfo3'><span lang=EN-US>Render actions from queue<o:p></o:p></span></li></ol><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The question is: if I put two config change very fast, one by one and second arrive before every scheduled action finished, will every scheduled action from the first config complete? Mean, all the actions coming from second config to be queued after all scheduled on the first push.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>The background of the question: I use “constraint chains”, means order like start A => B =>C stop C=>B=>A and it is essential to keep the order. However, If A, B and C running and I push config where all of them deleted, pacemaker has no constraints in the new config and schedule A,B,C stop as independent action, and this leads to resource failures. I already asked in the group and answered that this is behavior by design, Paacemaker only use the new config for change planning, so A,B and C become unconstrained orphans. My workaround was to send intermediate config, keeping resource to delete in config, but set target state “stopped’. For now, I am sending the intermediate config and request status until every resource to delete is stopped. However, if the scheduler put new actions after already planned, I need no wait and request status, I only need send cib with target state stopped and then immediately send cib with deleted resource. As the stop sequence already in the scheduler queue, it should work correctly and faster then my first approach.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you in advance for every advice and suggestion!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Sincerely,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Alex<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></div></body></html>