Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Custom CARP failover script - Not working?

    HA/CARP/VIPs
    1
    1
    89
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      phoadm
      last edited by

      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.2

      Any ideas?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.