Custom CARP failover script - Not working?
-
Re: Custom CARP failover script
I followed the instructions per the referred script. I want to launch a specific script when the node becomes CARP MASTER and another then the node becomes CARP BACKUP.
I went to /etc/pfSense-devd.conf and I added at the end:
notify 100 { match "system" "CARP"; match "type" "MASTER"; action "/usr/local/myscript.sh start"; }; notify 100 { match "system" "CARP"; match "type" "BACKUP"; action "/usr/local/myscript.sh stop"; };
However, upon reboot of the BACKUP node, the script command referred in the MASTER is launched within the node (i.e. myscript.sh receives a start command), whereas it should not be launched at all)!
If we manually stop the script at BACKUP and perform a failover (i.e. BACKUP now becomes MASTER), the start script is not invoked.
It is as if the start script is launched at node startup, irrespective of CARP status, and nothing is performed on HA failover.
MASTER node is version 24.11
BACKUP node is version 2.7.2Any ideas?