<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Vitaly,</p>
<p>I forgot to mention that the described behavior of preferring new
role names in CIB only applies to pcs-0.11. On the other hand,
pcs-0.10 prefers to put old role names into CIB.</p>
<p>Tomas</p>
<p><br>
</p>
<div class="moz-cite-prefix">Dne 11. 04. 25 v 21:55 vitaly
napsal(a):<br>
</div>
<blockquote type="cite"
cite="mid:1998794633.1109421.1744401358046@webmail-oxcs.networksolutionsemail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<div> Tomas, </div>
<div class="default-style"> Our cib is at 3.8 as you can see
below. </div>
<div class="default-style"> pcs constraint shows correct Promoted
and cib shows Master (from older configuration before system
upgrade). <br>
If I remove constraints and add them again they will show
Promoted in cibadmin on most of the systems, but I did have
cases when it still was showing Master. <br>
The good thing is that after removing and re-adding constraints
we can reconfigure postgres without failures in constraints but
we will have to find a better way to confirm that. <br>
I do not want to take more of your time on this (unless you are
interested in fixing inconsistency). We will try to hook to the
name of the constraint in cibadmin instead of the role. <br>
Thanks again! <br>
_Vitaly </div>
<div class="default-style"> <br>
module-248 ~ # pcs cluster cib | head -n 2 <br>
<cib crm_feature_set="3.15.0" validate-with="pacemaker-3.8"
epoch="55" num_updates="23" admin_epoch="1"
cib-last-written="Fri Apr 11 18:12:38 2025"
update-origin="module-248" update-client="cibadmin"
update-user="root" have-quorum="1" dc-uuid="1"> <br>
<configuration> <br>
module-248 ~ # pcs constraint config | grep -w Promoted <br>
Started resource 'DBSlave' with Promoted resource
'postgres-ms' <br>
Started resource 'DBMaster' with Promoted resource
'postgres-ms' <br>
module-248 ~ # pcs constraint config | grep -w Master <br>
module-248 ~ # cibadmin --query | grep -w Master <br>
<op id="postgres-monitor-interval-5s"
interval="5s" name="monitor" on-fail="restart" role="Master"
timeout="300s"/> <br>
<rsc_colocation
id="colocation-DBSlave-postgres-ms-Master" rsc="DBSlave"
rsc-role="Started" score="-10000" with-rsc="postgres-ms"
with-rsc-role="Master"/> <br>
<rsc_colocation
id="colocation-DBMaster-postgres-ms-Master" rsc="DBMaster"
rsc-role="Started" score="INFINITY" with-rsc="postgres-ms"
with-rsc-role="Master"/> <br>
module-248 ~ # cibadmin --query | grep -w Promoted <br>
<br>
</div>
<blockquote type="cite">
<div> On 04/11/2025 5:28 AM EDT Tomas Jelinek
<a class="moz-txt-link-rfc2396E" href="mailto:tojeline@redhat.com"><tojeline@redhat.com></a> wrote: </div>
<div> </div>
<div> </div>
<p>Hi Vitaly,</p>
<p>New role names are supported in CIB schema 3.7. If your CIB
hasn't been updated to at least that version of the schema,
then pcs has no choice other than to put the old role names
into CIB.</p>
<p>To see your CIB schema version, run 'pcs cluster cib | head'
and check the value of validate-with attribute of the root xml
element.</p>
<p>To update CIB to a newer schema, run 'pcs cluster
cib-upgrade'.</p>
<p>Regards,<br>
Tomas</p>
<div class="moz-cite-prefix"> Dne 10. 04. 25 v 14:31 vitaly
napsal(a): </div>
<blockquote type="cite">
<div> Hi Tomas. </div>
<div class="default-style"> Thank you very much for
clarification. </div>
<div class="default-style"> The only reason I worry is that
the script that I am running is supposed to run on the
client systems. After the "fix" where I remove old
constraints and create new ones I run another check to
confirm that old settings are gone and will not cause any
issues after upgrade. </div>
<div class="default-style"> If this check comes back with old
values I am issuing a warning that configuration "may" need
to be updated. </div>
<div class="default-style"> Below is condensed list of
commands I use to replace the old with new. </div>
<div class="default-style"> In any case, if pcs constraints
list always shows new values I could use it instead of
cibadmin to verify correct values. </div>
<div class="default-style"> </div>
<div class="default-style"> pcs constraint colocation remove
DBMaster postgres-ms </div>
<div class="default-style"> pcs constraint colocation remove
DBSlave postgres-ms <br>
pcs constraint colocation add DBMaster with Promoted
postgres-ms INFINITY id=colocation-
DBMaster-postgres-ms-Promoted <br>
pcs constraint colocation add DBSlave with Promoted
postgres-ms "-10000" id=colocation-
DBSlave-postgres-ms-Promoted <br>
pcs resource op delete postgres-monitor-interval-5s <br>
pcs resource op add postgres monitor interval=5s
timeout=300s on-fail=restart role=Promoted <br>
<br>
</div>
<div class="default-style"> Thank you very much for your help!
</div>
<div class="default-style"> _Vitaly </div>
<blockquote type="cite">
<div> On 04/10/2025 5:17 AM EDT Tomas Jelinek <a
class="moz-txt-link-rfc2396E"
href="mailto:tojeline@redhat.com" moz-do-not-send="true"><tojeline@redhat.com></a>
wrote: </div>
<div> </div>
<div> </div>
<p>Hi Vitaly,</p>
<p>You don't need to worry much about this.</p>
<p>When pcs is editing CIB, it prefers using the new role
names and automatically falls back to the old role names
based on pacemaker / CIB schema version. When pcs is
printing the configuration, it does a reverse
transformation and prints the new role names even if CIB
contains the old ones.</p>
<p>Pacemaker 2.1, which pcs 0.11 is compatible with, is
capable of handling both old and new role names.</p>
<p>If you want to get rid of the old role names, you may
replace them in CIB ('pcs cluster edit') or drop the
constraints and recreate them using pcs. If it fails, you
maybe have an old CIB version. You can update that with
'pcs cluster cib-upgrade'.</p>
<p>Regards,<br>
Tomas</p>
<p> </p>
<div class="moz-cite-prefix"> Dne 09. 04. 25 v 20:35 vitaly
napsal(a): </div>
<blockquote type="cite">
<div class="default-style">
<div style="margin-bottom: 0in;"> Hello, </div>
<div style="margin-bottom: 0in;"> I have dual node
clusters with postgres as one of the resources. </div>
<div style="margin-bottom: 0in;"> The clusters were
upgraded from pcs v 0.10 to pcs v 0.11. </div>
<div style="margin-bottom: 0in;"> Pcs V 0.11 eliminated
Master role and replaced it with Promoted. </div>
<div style="margin-bottom: 0in;"> For clusters that were
upgraded I needed to remove old configuration for
colocation because with old one in place while
creating new one commit of the configuration was
failing due to duplicate constraint. </div>
<div style="margin-bottom: 0in;"> Update works fine on
all the clusters but on one of them AFTER UPGRADE I
see different output in “cibadmin --query” and in “pcs
constraint list” </div>
<div> </div>
<div style="margin-bottom: 0in;"> The constraints in
“cibadmin –query” are showing: <br>
<rsc_colocation rsc="DBSlave"
with-rsc="postgres-ms" score="-10000"
rsc-role="Started" with-rsc-role="Master"
id="colocation-DBSlave-postgres-ms-Promoted"/> </div>
<div> </div>
<div style="margin-bottom: 0in;"> <rsc_colocation
rsc="DBMaster" with-rsc="postgres-ms" score="INFINITY"
rsc-role="Started" with-rsc-role="Master"
id="colocation-DBMaster-postgres-ms-Promoted"/> </div>
<div> </div>
<div style="margin-bottom: 0in;"> Same constraints in
“pcs constraint list” were showing: <br>
Colocation Constraints: </div>
<div style="margin-bottom: 0in;"> Started resource
'DBSlave' with Promoted resource
'postgres-ms' score=-10000 </div>
<div> </div>
<div style="margin-bottom: 0in;"> Started resource
'DBMaster' with Promoted resource
'postgres-ms' score=INFINITY </div>
<div> </div>
<div style="margin-bottom: 0in;"> On all other systems
“cibadmin –query” is in agreement with pcs and shows:
<br>
<rsc_colocation rsc="DBSlave"
with-rsc="postgres-ms" score="-10000"
rsc-role="Started" with-rsc-role="Promoted"
id="colocation-DBSlave-postgres-ms-Promoted"/> </div>
<div> </div>
<div style="margin-bottom: 0in;"> <rsc_colocation
rsc="DBMaster" with-rsc="postgres-ms" score="INFINITY"
rsc-role="Started" with-rsc-role="Promoted"
id="colocation-DBMaster-postgres-ms-Promoted"/> </div>
<div> </div>
<div style="margin-bottom: 0in;"> So my problem is in
with-rsc-role showing “Master” on a single system and
“Promoted” on all others. </div>
<div> </div>
<div style="margin-bottom: 0in;"> Would appreciate it if
anybody could shed some light on the issue. </div>
<div style="margin-bottom: 0in;"> Thank you very much! </div>
<div style="margin-bottom: 0in;"> _Vitaly <br>
<br>
</div>
<div> </div>
</div>
<br>
<pre class="moz-quote-pre">_______________________________________________
Manage your subscription:
<a class="moz-txt-link-freetext"
href="https://lists.clusterlabs.org/mailman/listinfo/users"
moz-do-not-send="true">https://lists.clusterlabs.org/mailman/listinfo/users</a>
ClusterLabs home: <a class="moz-txt-link-freetext"
href="https://www.clusterlabs.org/" moz-do-not-send="true">https://www.clusterlabs.org/</a>
</pre>
</blockquote>
_______________________________________________ <br>
Manage your subscription: <br>
<a class="moz-txt-link-freetext"
href="https://lists.clusterlabs.org/mailman/listinfo/users"
moz-do-not-send="true">https://lists.clusterlabs.org/mailman/listinfo/users</a>
<br>
<br>
ClusterLabs home: <a class="moz-txt-link-freetext"
href="https://www.clusterlabs.org/" moz-do-not-send="true">https://www.clusterlabs.org/</a>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</body>
</html>