evrardjp / ansible-keepalived

Keepalived role for ansible deployment
Apache License 2.0
98 stars 98 forks source link

Identical configuration does not work on ubuntu 22.04 while 20.04 works fine #236

Open scuben opened 2 years ago

scuben commented 2 years ago

I am not sure if this here is the right place. But as the very same configuration is working in ubuntu 20.04 I think it's worth a shot here.

This is my demo config:

global_defs {
  enable_script_security
  script_user root
}

vrrp_script check_script_dummy {
  script "/usr/bin/test -f /var/keepalive"
  interval 2
  fall 2
  rise 2
}

vrrp_instance VI_01_V4 {
  interface ens3
  state MASTER
  virtual_router_id 51
  priority 101
  advert_int 1

  unicast_src_ip [LOCAL-IP]
  unicast_peer {
    [PEER-IP]
  }
  virtual_ipaddress {
    [FLOATING-IP] dev dummy0
  }
  track_script {
    check_script_dummy
  }

}

The other server has the same configuration, except it defaults to BACKUP and 102 priority.

I tested this configuration with ubuntu 20.04 and 22.04 with exactly the same provisioning for both. While ubuntu 20.04 negotiates a MASTER quickly, the ubuntu 22.04 servers do not send VRRP packages at all.

The issue probably is not within this package (right?). But if someone could point me in a direction to look, I'd be very grateful!

evrardjp commented 1 year ago

As you can see, I didn't give much love of keepalived recently. (i didn't get the chance with new job). I will have a look (if all goes well!) when I will be on vacation next week. Sorry for the VERY long delay.

evrardjp commented 1 year ago

Oh, btw... you're right: this role wouldn't change the behaviour of keepalived.

Your case is interesting. FYI, I would give at least a 100 difference in priority, to start with. Did you check with tcpdump ? What does the starting of keepalived do ?