Keepalived VRRP preempting not working

Hi all, I've set up keepalived between my 2 Belkin RT1800 (mt7621) routers running OpenWrt 23.05.3. Everything is working very well apart from one thing: VRRP preempting.

I've configured weighted tracking for the WAN interface, so that the backup router should take over with a higher priority, but that isn't happening.

Below is an example instance from my backup router's keepalived.conf.

No matter what settings I change on the luci-app-keepalived (specifically the Disable Preempt option is turned off, but I've tried various other combinations of settings), the nopreempt line never goes away from the configuration.

Both nodes are starting up in backup mode but I've also tried with a primary/backup startup without any difference to preempting.

I'm wondering if I'm missing something or if this could be a bug. Thank you for any pointers.

vrrp_instance iot {
	authentication {
		auth_type PASS
		auth_pass xxxxxxxx
	}
	state BACKUP
	interface br-lan.501
	unicast_src_ip 192.168.101.253
	virtual_router_id 151
	version 3
	priority 100
	advert_int 5
	preempt_delay 30
	garp_master_delay 1
	garp_master_refresh 1
	garp_master_repeat 1
	garp_master_refresh_repeat 1
	nopreempt
	notify_backup "/bin/busybox env -i ACTION=NOTIFY_BACKUP TYPE=INSTANCE NAME=iot /sbin/hotplug-call keepalived"
	notify_master "/bin/busybox env -i ACTION=NOTIFY_MASTER TYPE=INSTANCE NAME=iot /sbin/hotplug-call keepalived"
	notify_fault "/bin/busybox env -i ACTION=NOTIFY_FAULT TYPE=INSTANCE NAME=iot /sbin/hotplug-call keepalived"
	notify_stop "/bin/busybox env -i ACTION=NOTIFY_STOP TYPE=INSTANCE NAME=iot /sbin/hotplug-call keepalived"
	virtual_ipaddress {
		192.168.101.254 dev br-lan.501 label br-lan.501:v501 scope global
	}
	track_interface {
		wan weight 80
	}
	unicast_peer {
		192.168.101.251
	}
}

I've also found a(nother?) bug on the luci-app-keepalived: changing the Debug Level setting on Instance>Advanced doesn't change any configuration settings and if changed+saved it reverts to the default 0.

I've also tried with an OpenWrt snapshot from today, same result on both VRRP preempting and the debug level.

Pinging Jaymin @jempatel and Florian @feckert whom I think are the app's developer and maintainer, I hope you guys don't mind.

I guess I should have posted the thread in the developers section. Live and learn.

Opened an issue on GtHub: https://github.com/openwrt/luci/issues/7114

1 Like

Florian @feckert has already fixed this in master, thank you Florian, much appreciated.

1 Like