Alex Carpentieri
Alex Carpentieri

Reputation: 1

Keepalived is not running my script when I use "notify"

I want to execute a script when the server gets the VIP. I have been unable to get any form of 'notify' to work. The system runs on an old version of Linux, but after looking at my /share/doc/keepalived/samples it has sample code for notify.

keepalived version 1.2.2

system info Linux Debian Wheezy 7 armv5tejl

keepalived.conf

vrrp_script keepalived_check {
      script "/usr/lib/cgi-bin/keepalived_check.sh"
      interval 1
      timeout 5
      rise 3
      fall 3

}

vrrp_instance VI_1 {
    debug 3
    state BACKUP
    nopreempt
    interface eth0
    virtual_router_id 50
    priority 200
    authentication {
        auth_type PASS
        auth_pass 1111
    }
    virtual_ipaddress {
        xx.xx.xx.94/24
    }
    unicast_src_ip xx.xx.xx.92
    unicast_peer {
        xx.xx.xx.xx.93
    }
    track_script {
        keepalived_check
    }


    notify_master "/etc/keepalived/test-keepalived-restart.sh"
    #notify_backup "/etc/keepalived/test-keepalived-restart.sh"
    #notify "/etc/keepalived/test-keepalived-restart.sh"
}

Any help would be greatly appreciated!

I've made sure that the executable files and Keepalived files have permissions for execuation.

I've make sure the executable file is able to be executed on its own.

When I look at the logs, I am not seeing any indication that Keepalived is trying to execute the file.

Keepalived_vrrp: VRRP_Instance(VI_1) Entering MASTER STATE
avahi-daemon[2427]: Registering new address record for xx.xx.xx.94

Upvotes: 0

Views: 70

Answers (0)

Related Questions