During keepalived config generation for the vrrp_instance and vrrp_sync_group
the notify_* sections are automatic added to the runtime keepalived.conf.
This could be used for service which want to react on keepalived notifications.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
In a vrrp_instance the track_interface could not be referenced similar
to a track_script. The uci track_interface section must be always set
into every vrrp_instance.
During config generation use the already prepared function
"print_track_elem_indent" to write the track_interface section into every
vrrp_instance which references this.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
If you add a notify_* script which is not only a path to a script or
to a bin file, it is necessary to quote to whole string. If you do not
quote this the config will not get accepted by keepalived and so will
not start. This will fix this issue.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
keepalived seems to be rather particular about which config parameters
come before others.
When defining a virtual IP address, keepalived will check to see if the
vrrp instance is associated with a valid interface. Previously, the
interface parameter was declared after the virtual IP address which
caused an error when keepalived tried to run this check. Keepalived
tries to fall back to checking if 'eth0' exists.
The fix is to re-order the config stanzas so that the interface
parameter comes before the virtual IP address definitions.
Signed-off-by: Ben Kelly <ben@benjii.net>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Also fix ordering of config stanzas
We were parsing the track_script and track_interface definitions to
include the weight param when configuring a vrrp_instance. This is not
correct, as the weight param inside a vrrp instance is used to augment
the one defined in the script.
We were also not taking into account vrrp_script stanzas
This commit skips the parsing and simply lists the name of the
track/vrrp object
Signed-off-by: Ben Kelly <ben@benjii.net>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Adding @scrpi (Ben Kelly).
Initial UCI config support was written by me (@commodo)
Updates & fixes added by Ben.
Signed-off-by: Ben Kelly <ben@benjii.net>
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>