Hello all,
with keepalived 2.x the behavior of transition scripts and sync-group seems to have changed.
It was
VyOS 1.2.x only supports transition scripts on the vrrp group level like:
high-availability {
vrrp {
group eth1 {
advertise-interval 1
authentication {
password test
type plaintext-password
}
hello-source-address 10.10.0.11
interface eth1
no-preempt
transition-script {
backup /config/scripts/vrrp-fail.sh
fault /config/scripts/vrrp-fail.sh
master /config/scripts/vrrp-master.sh
}
virtual-address 192.168.240.1/24
vrid 101
}
}
}If you are using sync-groups for syncing multiple VRRP groups you have to define the transition scripts on the sync-group level according to the man page of the keepalived 2.x version:
(https://www.keepalived.org/manpage.html)
vrrp_sync_group <STRING> {
....
notify_master /path/to_master.sh [username [groupname]]
....
}e.g. in the following example no transition scripts are executed:
high-availability {
vrrp {
group eth0 {
advertise-interval 1
authentication {
password test
type plaintext-password
}
hello-source-address 10.128.2.222
interface eth0
no-preempt
virtual-address 192.168.241.1/24
vrid 100
}
group eth1 {
advertise-interval 1
authentication {
password test
type plaintext-password
}
hello-source-address 10.128.2.222
interface eth1
no-preempt
transition-script {
backup /config/scripts/vrrp-fail.sh
fault /config/scripts/vrrp-fail.sh
master /config/scripts/vrrp-master.sh
}
virtual-address 192.168.240.1/24
virtual-address 192.168.240.5/24
virtual-address 192.168.240.10/24
vrid 101
}
sync-group TEST {
member eth0
member eth1
}
}
}Unfortunately the config node of the sync-group only have "member" childs.
In order to support sync-group together with transition scripts this needs to be extended!
And since version 1.2.0 there is probably no workaround if you have more than one vrrp group together with sync-group.
Regards
Markus
