OpenNebula / one-apps

Toolchain to build OpenNebula appliances
Apache License 2.0
12 stars 9 forks source link

VR: Make one-failover wait for keepalived to be ready #110

Closed sk4zuzu closed 1 month ago

sk4zuzu commented 1 month ago

Keepalived sends notifications to one-failover daemon via the /run/keepalived/vrrp_notify_fifo.sock named pipe, basing on that one-failover enabled or disables VR's features. Theoretically, if a feature requires VIPs (or other conditions) to be present it may fail or be misconfigured if keepalived doesn't set them quick enough.

We can prevent that by adding ready action to keepalived's openrc script and then reuse it in the one-failover logic. The action would report if live config matches config requested in context variables.

Example:

$ rc-service keepalived ready; echo $?
0