keepalived: high-availability files and data sync 19374/head
authorJaymin Patel <jem.patel@gmail.com>
Fri, 9 Sep 2022 13:40:49 +0000 (19:10 +0530)
committerJaymin Patel <jem.patel@gmail.com>
Thu, 13 Oct 2022 11:27:02 +0000 (16:57 +0530)
commit33398a38aacc02c89c277f5106c079b9c61b97a2
tree25cc192f1fc673839d115a4a3aa2be9532e41c7b
parent83ff83e32055dc50b01fffe7bae9ea113655756b
keepalived: high-availability files and data sync

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>
18 files changed:
net/keepalived/Makefile
net/keepalived/files/etc/hotplug.d/keepalived/501-rpcd [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/505-system [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/509-ucitrack [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/511-firewall [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/551-dnsmasq [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/555-dropbear [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/600-uhttpd [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/700-luci [new file with mode: 0644]
net/keepalived/files/etc/hotplug.d/keepalived/810-files [new file with mode: 0644]
net/keepalived/files/etc/init.d/keepalived-inotify [new file with mode: 0644]
net/keepalived/files/keepalived.init
net/keepalived/files/lib/functions/keepalived/common.sh [new file with mode: 0644]
net/keepalived/files/lib/functions/keepalived/hotplug.sh [new file with mode: 0644]
net/keepalived/files/usr/bin/keepalived-rsync-inotify [new file with mode: 0644]
net/keepalived/files/usr/libexec/keepalived/rpc/sync.sh [new file with mode: 0644]
net/keepalived/files/usr/libexec/rpcd/keepalived
net/keepalived/files/usr/share/keepalived/scripts/rsync.sh [new file with mode: 0644]