This commit adds support for folder synchronization.
An example is in the 810-files file where it is explained how to
synchronize all hotplug files of keepalived.
Signed-off-by: Francesco Benini <francy.benini@gmail.com>
The hotplug scripts are called with every state change. When called, the
scripts are processed under '/etc/hotplug.d/keepalived'. This change adds
the functionality that the last state change of the keepalived can be
queried via the ubus.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
When "set_reload_if_sync" is set, the service is reloaded when the
configuration changes. For dnsmasq this means that the service, if
stopped, is started, and we don't want this in the backup node.
Signed-off-by: Francesco Benini <francy.benini@gmail.com>
Some init.d scripts like firewall and sqm do not return the actual state
of the service if called with "running" parameter. This result in the
init script called with "start" parameter and the service may not load
the new configuration. Firewall init script is one of this
An option is added in order to skip the "running" check for the service.
Signed-off-by: Francesco Benini <francy.benini@gmail.com>
add new package keepalived-sync to synchronize files and data
between master and backup node. The master node uses SSH over rsync
to send and the backup node will use inotifywatch to watch received files.
The master node can track rsync.sh script to send configuration file on
a backup node based on the vrrp_script configuration of the same script.
The backup node will have a keepalived-inotify service, which would watch
for newly received files and it would call hotplug event. Each service
can keep its respective script under the keepalived hotplug directory and
executes commands to stop, start service or update any config in real-time.
Whenever a switchover will happen, the backup node would have the latest
config and data files from the master node.
Hotplug events can be used to apply config when files are received.
Signed-off-by: Jaymin Patel <jem.patel@gmail.com>