What I want - in case of split-brain (connectivity loss between two nodes) ONLY, each node should check ping status and start resources if ping is OK. How to implement this?
"pcs config show", pretty self-explaining:
Cluster Name: pbx_cluster
Corosync Nodes:
freepbx01 freepbx02
Pacemaker Nodes:
freepbx01 freepbx02
Resources:
Resource: virtual_ip (class=ocf provider=heartbeat type=IPaddr2)
Attributes: ip=10.16.12.21 cidr_netmask=24 nic=eth4lan
Meta Attrs: migration-threshold=10 failure-timeout=60s
Operations: start interval=0s timeout=20s (virtual_ip-start-interval-0s)
stop interval=0s timeout=20s (virtual_ip-stop-interval-0s)
monitor interval=30s (virtual_ip-monitor-interval-30s)
Resource: asterisk (class=ocf provider=heartbeat type=asterisk)
Attributes: user=asterisk group=asterisk
Meta Attrs: migration-threshold=10 failure-timeout=60s
Operations: start interval=0s timeout=20 (asterisk-start-interval-0s)
stop interval=0s timeout=20 (asterisk-stop-interval-0s)
monitor interval=60s timeout=30 (asterisk-monitor-interval-60s)
Clone: DefaultGatewayCheck-clone
Meta Attrs: target-role=Stopped is-managed=false
Resource: DefaultGatewayCheck (class=ocf provider=pacemaker type=ping)
Attributes: dampen=5s multiplier=1000 host_list="10.16.12.254"
Operations: start interval=0s timeout=60 (DefaultGatewayCheck-start-interval-0s)
stop interval=0s timeout=20 (DefaultGatewayCheck-stop-interval-0s)
monitor interval=60s timeout=60 (DefaultGatewayCheck-monitor-interval-60s)
Stonith Devices:
Fencing Levels:
Location Constraints:
Resource: asterisk
Enabled on: freepbx01 (score:INFINITY) (role: Started) (id:cli-prefer-asterisk)
Resource: virtual_ip
Enabled on: freepbx01 (score:INFINITY) (role: Started) (id:cli-prefer-virtual_ip)
Ordering Constraints:
start virtual_ip then start asterisk (kind:Mandatory) (id:order-virtual_ip-asterisk-mandatory)
Colocation Constraints:
asterisk with virtual_ip (score:INFINITY) (id:colocation-asterisk-virtual_ip-INFINITY)
Ticket Constraints:
Alerts:
No alerts defined
Resources Defaults:
migration-threshold: 10
failure-timeout: 60s
Operations Defaults:
No defaults set
Cluster Properties:
cluster-infrastructure: corosync
cluster-name: pbx_cluster
dc-version: 1.1.24-3850484742
have-watchdog: false
last-lrm-refresh: 1659519197
no-quorum-policy: ignore
stonith-enabled: false
Quorum:
Options:
0 Answers