Enable systemd-networkd-wait-online
systemctl enable systemd-networkd-wait-online.service
And modify /usr/lib/systemd/system/keepalived.service
[Unit] | |
Description=LVS and VRRP High Availability Monitor | |
Wants=network-online.target | |
After=syslog.target network.target network-online.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/keepalived.pid | |
KillMode=process | |
EnvironmentFile=-/etc/sysconfig/keepalived | |
ExecStart=/usr/bin/keepalived $KEEPALIVED_OPTIONS | |
ExecReload=/bin/kill -HUP $MAINPID | |
[Install] | |
WantedBy=multi-user.target |