Closed ReSearchITEng closed 5 years ago
check your firewall accept the VRRP protocol:
iptables -I INPUT -p vrrp -j ACCEPT
iptables -I OUTPUT -p vrrp -j ACCEPT
@sinamoghaddas Thanks for the suggestion. It tried with firewall fully open (ACCEPT policy). Also it was noticed the error is related to permissions: "(Operation not permitted)". Without any changes to the firewall, by adding the privileged mode, everything went fine.
But ideally, we need to find the exact capability to enable, not full.
@ReSearchITEng this is my cap config:
cap_add:
- NET_ADMIN
- NET_BROADCAST
- NET_RAW
Thanks, I will to add these!
--cap-add=NET_ADMIN does not seem to be enough, as it gives:
Cant send advert to 192.168.1.195 (Operation not permitted)
By adding
--privileged
, everything seems ok.When it gives error, I am running with:
docker run --name ka --env KEEPALIVED_INTERFACE=$(ip route | grep default | head -1 | cut -d" " -f5) --env KEEPALIVED_PASSWORD="d0cker" --cap-add=NET_ADMIN --net=host --env KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['192.168.1.176', '192.168.1.195', '192.168.1.92']" --env KEEPALIVED_VIRTUAL_IPS="#PYTHON2BASH:['192.168.1.99']" --detach osixia/keepalived:1.4.1 --loglevel debug