[ClusterLabs] Location not working [FIXED]
Miro Igov
miro.igov at pharmya.com
Tue Apr 11 14:42:03 EDT 2023
This is a multipart message in MIME format.
----Rq39EWBVFo_related
Content-Type: text/html;
charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Type: multipart/related;
boundary="--Rq39EWBVFo_related" charset="utf-8"
<html><body><div dir=3D"auto">It does not matter if ip resource starts on n=
ode without nginx_active. It is equal situation as if the ip is stopped.</d=
iv><div dir=3D"auto">The public ip forwards to the virtual ip and if there =
is no nginix on the node running it will be same as if virtual ip is not ru=
nning.</div><div id=3D"ms-outlook-mobile-signature" dir=3D"auto"><div id=3D=
"mail-editor-reference-message-container" dir=3D"auto"><br><hr style=3D"dis=
play:inline-block;width:98%" tabindex=3D"-1"><div id=3D"divRplyFwdMsg" styl=
e=3D"font-size: 11pt;"><strong>From:</strong> Users <users-bounces at clust=
erlabs.org> on behalf of Ken Gaillot <kgaillot at redhat.com><br><str=
ong>Sent:</strong> Tuesday, April 11, 2023, 18:27<br><strong>To:</strong> C=
luster Labs - All topics related to open-source clustering welcomed <use=
rs at clusterlabs.org><br><strong>Subject:</strong> Re: [ClusterLabs] Locat=
ion not working [FIXED]<br></div><br>On Tue, 2023-04-11 at 17:31 +0300, Mir=
o Igov wrote:<br>> I fixed the issue by changing location definition fro=
m:<br>> <br>> location intranet-ip_on_any_nginx intranet-ip \<br>>=
; rule -inf: opa-nginx_1_active eq 0 \<br>> rule -inf: o=
pa-nginx_2_active eq 0<br>> <br>> To:<br>> <br>> location int=
ranet-ip_on_any_nginx intranet-ip \<br>> rule opa-nginx_1_active=
eq 1 \<br>> rule opa-nginx_2_active eq 1<br>> <br>> N=
ow it works fine and shows the constraint with: crm res constraint<br>> =
intranet-ip<br><br>Ah, I suspect the issue was that the original constraint=
compared only<br>against 0, when initially (before the resources ever star=
t) the<br>attribute is undefined.<br><br>Note that your new constraint says=
that the IP *prefers* to run where<br>the attribute is 1, but if there are=
no nodes with the attribute set to<br>1, it can still start somewhere. On =
the other hand, bans are mandatory,<br>so you may want to go back to that a=
nd just specify it as "ne 1".<br><br>> <br>> <br>> <br>> Fro=
m: Users <users-bounces at clusterlabs.org> On Behalf Of Miro Igov<br>&g=
t; Sent: 10 April 2023 14:19<br>> To: users at clusterlabs.org<br>> Subj=
ect: [ClusterLabs] Location not working<br>> <br>> Hello,<br>> I =
have a resource with location constraint set to:<br>> <br>> location=
intranet-ip_on_any_nginx intranet-ip \<br>> rule -inf: opa-ngin=
x_1_active eq 0 \<br>> rule -inf: opa-nginx_2_active eq 0<br>>=
; <br>> In syslog I see the attribute transition:<br>> Apr 10 12:11:=
02 intranet-test2 pacemaker-attrd[1511]: notice:<br>> Setting opa-nginx=
_1_active[intranet-test1]: 1 -> 0<br>> <br>> Current cluster stat=
us is :<br>> <br>> Node List:<br>> * Online: [ intranet-test1 i=
ntranet-test2 nas-sync-test1 nas-sync-<br>> test2 ]<br>> <br>> * =
stonith-sbd (stonith:external/sbd): Started intranet-test2<br>> * adm=
in-ip (ocf::heartbeat:IPaddr2): Started nas-sync-<br>> test2<b=
r>> * cron_symlink (ocf::heartbeat:symlink): Started<br>=
> intranet-test1<br>> * intranet-ip (ocf::heartbeat:IPaddr2): =
Started intranet-<br>> test1<br>> * mysql_1 (systemd:mariadb@=
intranet-test1): Started<br>> intranet-test1<br>> * mysql_2 =
(systemd:mariadb at intranet-test2): Started<br>> intranet-test2=
<br>> * nginx_1 (systemd:nginx at intranet-test1): Stopped<br>> =
* nginx_1_active (ocf::pacemaker:attribute): Stopped<br>> *=
nginx_2 (systemd:nginx at intranet-test2): Started intranet-<br>> tes=
t2<br>> * nginx_2_active (ocf::pacemaker:attribute): Started=
<br>> intranet-test2<br>> * php_1 (systemd:php5.6-fpm at intrane=
t-test1): Started<br>> intranet-test1<br>> * php_2 (syste=
md:php5.6-fpm at intranet-test2): Started<br>> intranet-test2<br>> =
* data_1 (ocf::heartbeat:Filesystem): Stopped<br>> * data_2 =
(ocf::heartbeat:Filesystem): Started intranet-<br>> test2<br>&g=
t; * nfs_export_1 (ocf::heartbeat:exportfs): Stopped<br>>=
* nfs_export_2 (ocf::heartbeat:exportfs): Started nas-<br>&=
gt; sync-test2<br>> * nfs_server_1 (systemd:nfs-server at nas-sync=
-test1): <br>> Stopped<br>> * nfs_server_2 (systemd:nfs-s=
erver at nas-sync-test2): <br>> Started nas-sync-test2<br>> <br>>=
Failed Resource Actions:<br>> * nfs_server_1_start_0 on nas-sync-test=
1 'error' (1): call=3D95,<br>> status=3D'complete', exitreason=3D'', las=
t-rc-change=3D'2023-04-10 12:35:12<br>> +02:00', queued=3D0ms, exec=3D20=
9ms<br>> <br>> <br>> Why intranet-ip is located on intranet-test=
1 while nginx_1_active is<br>> 0 ?<br>> <br>> # crm res constrain=
t intranet-ip<br>> <br>> cron_symlink =
<br>> (score=3DINFINITY, id=3Dc_cron=
_symlink_on_intranet-ip)<br>> * intranet-ip<br>> : Node nas-sync-<b=
r>> test2 <br>&g=
t; (score=3D-INFINITY, id=3Dintranet-ip_loc-rule)<br>> : Node nas-sync=
-<br>> test1 <br=
>> (score=3D-INFINITY, id=3Dintranet-ip_loc-rule)<br>> <br>> Why =
no constraint entry for intranet-ip_on_any_nginx location ?<br>> <br>&g=
t; <br>> <br>> <br>> This message has been sent as a part of di=
scussion between PHARMYA<br>> and the addressee whose name is specified =
above. Should you receive<br>> this message by mistake, we would be most=
grateful if you informed us<br>> that the message has been sent to you.=
In this case, we also ask that<br>> you delete this message from your m=
ailbox, and do not forward it or<br>> any part of it to anyone else.<br>=
> Thank you for your cooperation and understanding. =09<br>&=
gt; <br>> _______________________________________________<br>> Manage=
your subscription:<br>> https://lists.clusterlabs.org/mailman/listinfo/=
users<br>> <br>> ClusterLabs home: https://www.clusterlabs.org/<br>--=
<br>Ken Gaillot <kgaillot at redhat.com><br><br>_______________________=
________________________<br>Manage your subscription:<br>https://lists.clus=
terlabs.org/mailman/listinfo/users<br><br>ClusterLabs home: https://www.clu=
sterlabs.org/<br><br><br></div></div>=0A<br><table id=3D"pharmya_gdpr_conta=
iner" border=3D"0" cellspacing=3D"0" cellpadding=3D"0" width=3D"100%">
=0A=09<tr>
=0A=09=09<td width=3D"600">
=0A<table width=3D"100%" cellpadding=3D"0" cellspacing=3D"0" border=3D"0">
=0A <tr>
=0A <td style=3D"border-top: 2px solid #8C8C8C; text-align:justify;">
=0A <img src=3D"cid:2f49a8a2473e0d078ea0f3a820947b04"=20
=0A=09=09=09class=3D"replace_cid" alt=3D"GDPR Logo" width=3D"126"=20
=0A=09=09=09height=3D"50" align=3D"left" style=3D"margin-right:5px;"/>
=0A=09=09=09
=0A=09=09=09<span style=3D"font-size:10pt;=20
=0Afont-family: Segoe, 'Segoe UI', 'DejaVu Sans', 'Trebuchet MS', Verdana, =
sans-serif;"=20
=0Aclass=3D"gdpr_text">
=0AThis message has been sent as a part of discussion between PHARMYA
=0Aand the addressee whose name is specified above. Should you receive
=0Athis message by mistake, we would be most grateful if you informed
=0Aus that the message has been sent to you. In this case, we also ask
=0Athat you delete this message from your mailbox, and do not forward
=0Ait or any part of it to anyone else.<br>
=0AThank you for your cooperation and understanding.
=0A=09=09=09</span>
=0A </td>
=0A </tr>
=0A</table>
=0A=09</td>
=0A=09<td></td>
=0A</table>
=0A<br></body></html>
----Rq39EWBVFo_related
Content-Type: image/png;
name="PharmyaGDPRLogo1.png"
Content-Disposition: inline;
filename="PharmyaGDPRLogo1.png"
Content-ID: <2f49a8a2473e0d078ea0f3a820947b04>
Content-Transfer-Encoding: base64
iVBORw0KGgoAAAANSUhEUgAAAH4AAAAyCAMAAACtZ5+tAAAAGXRFWHRTb2Z0d2FyZQBBZG9i
ZSBJbWFnZVJlYWR5ccllPAAAACpQTFRF////M2bMzMzMtLSzAAAAADP/ZmaZmZmZ/8wzTU1M
mZn/Zpn/s8T1zMz/vnHpaAAAArxJREFUeNrsmOuSqyAMgJHctN2+/+ueJEgFRWvdVn/sYToV
ZYbP3IMh/B+Xj59793LAR0aMS3i3Z8TPDH2Dm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