J'ai deux ganglions : - patroni1 : 192.168.1.38 - patroni2 : 192.168.1.39
et IP virtuelle : 192.168.1.40
J'ai installé HA-Proxy sur les deux.
Voici l'état de mon PC lorsque VIP est attaché à patroni2 et que haproxy est activé sur patroni2
-----------
[root@patroni1 ~]# pcs status
Cluster name: haproxy_cluster
Stack: corosync
Current DC: patroni2 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum
Last updated: Thu Nov 29 21:29:00 2018
Last change: Thu Nov 29 21:24:52 2018 by root via cibadmin on patroni1
2 nodes configured
4 resources configured
Online: [ patroni1 patroni2 ]
Full list of resources:
xen-fencing-patroni2 (stonith:fence_xenapi): Started patroni1
xen-fencing-patroni1 (stonith:fence_xenapi): Started patroni2
Resource Group: HAproxyGroup
haproxy (ocf::heartbeat:haproxy): Started patroni2
VIP (ocf::heartbeat:IPaddr2): Started patroni2
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
[root@patroni1 ~]# pcs resource show VIP
Resource: VIP (class=ocf provider=heartbeat type=IPaddr2)
Attributes: cidr_netmask=24 ip=192.168.1.40
Operations: monitor interval=1s (VIP-monitor-interval-1s)
start interval=0s timeout=20s (VIP-start-interval-0s)
stop interval=0s timeout=20s (VIP-stop-interval-0s)
[root@patroni1 ~]# pcs resource show haproxy
Resource: haproxy (class=ocf provider=heartbeat type=haproxy)
Attributes: binpath=/usr/sbin/haproxy conffile=/etc/haproxy/haproxy.cfg
Operations: monitor interval=10s (haproxy-monitor-interval-10s)
start interval=0s timeout=20s (haproxy-start-interval-0s)
stop interval=0s timeout=20s (haproxy-stop-interval-0s)
-----------
Mon problème est le suivant : le fencing ne se déclenche pas lorsque je tue manuellement haproxy sur patroni2. le fencing ne se déclenche que lorsque j'arrête ou redémarre manuellement patroni2.
Voici l'état de pcs lorsque je tue manuellement haproxy
------------
[root@patroni1 ~]# pcs status
Cluster name: haproxy_cluster
Stack: corosync
Current DC: patroni2 (version 1.1.18-11.el7_5.3-2b07d5c5a9) - partition with quorum
Last updated: Thu Nov 29 21:37:37 2018
Last change: Thu Nov 29 21:24:52 2018 by root via cibadmin on patroni1
2 nodes configured
4 resources configured
Online: [ patroni1 patroni2 ]
Full list of resources:
xen-fencing-patroni2 (stonith:fence_xenapi): Started patroni1
xen-fencing-patroni1 (stonith:fence_xenapi): Started patroni2
Resource Group: HAproxyGroup
haproxy (ocf::heartbeat:haproxy): Started patroni2
VIP (ocf::heartbeat:IPaddr2): Starting patroni2
Failed Actions:
* haproxy_monitor_10000 on patroni2 'not running' (7): call=38, status=complete, exitreason='',
last-rc-change='Thu Nov 29 21:37:36 2018', queued=0ms, exec=0ms
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
------------
Comment faire en sorte que la clôture soit déclenchée lorsque le HA-Proxy ne répond pas ?
Je vous prie d'agréer, Monsieur le Président, l'expression de mes sentiments distingués. -bino-