How can I avoid VRRP packet sending failure when hot loading firewall? #2322
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
keepalived runs the notify_master script at the same time as it decides to become master and start sending adverts, so I can only assume that the reload_firewalld.sh script (and this is possibly due to firewall-cmd) takes several seconds to execute. So far as I can see there are 2 possibilities.
In order for the VRRP protocol to work properly it is essential that VRRP packets can be sent as soon as keepalived decides that a VRRP instance should become master (otherwise another device may decide to become master if there are more than two VRRP systems involved). What are your reasons for reloading firewalld? I think you need to look at that first and probably ensure that your firewall configuration is permanently set up so that you don't need to hot load the firewall (I note that you don't have a notify_backup script to update the firewall when transitioning to backup state, so why does the firewall need reloading when transitioning to master state?). Alternatively can you just issue the necessary commands to change the firewall configuration, rather than doing a full reload? |
Beta Was this translation helpful? Give feedback.
-
@qqliuxiaoran Is it possible to make the backup machine reload the firewall configuration immediately after the rsync, rather than waiting for the backup machine switching to MASTER state? The problem seems to be reloading the firewall configuration at the same time as transitioning to master. We have in the past seen problems with systems not being able to receive VRRP adverts until they become master and send an advert; once they have sent an advert, they can start receiving them and if they are lower priority than the true master, they then revert to backup state. This appears to be due to their initially being no conntrack entry for the VRRP adverts, and only once an entry has been created due to sending an advert can adverts then be received (their is probably a rule something like Do you know how long the |
Beta Was this translation helpful? Give feedback.
@qqliuxiaoran Is it possible to make the backup machine reload the firewall configuration immediately after the rsync, rather than waiting for the backup machine switching to MASTER state? The problem seems to be reloading the firewall configuration at the same time as transitioning to master.
We have in the past seen problems with systems not being able to receive VRRP adverts until they become master and send an advert; once they have sent an advert, they can start receiving them and if they are lower priority than the true master, they then revert to backup state. This appears to be due to their initially being no conntrack entry for the VRRP adverts, and only once an entry has been cr…