Closed husa570 closed 5 years ago
Oddly i have just started to get the exact same starting yesterday.
If the node itself is in the KEEPALIVED_UNICAST_PEERS, it gets confused by its own unicast message. I do run a three node setup and had the same issue, when my list included all my three nodes. After removing the node itself from the list, everything returned to expected state.
Though, I would prefer to keep all nodes with the same KEEPALIVED_UNICAST_PEERS values and make the entrypoint script filter out the nodes own ip.
If the node itself is in the KEEPALIVED_UNICAST_PEERS, it gets confused by its own unicast message. I do run a three node setup and had the same issue, when my list included all my three nodes. After removing the node itself from the list, everything returned to expected state. Though, I would prefer to keep all nodes with the same KEEPALIVED_UNICAST_PEERS values and make the entrypoint script filter out the nodes own ip.
I can confirm that I see the same as @meyayl, for simplify configuration I whould also prefer to have the same keepalive config in both nodes if possible. My "feeling" (or lack of memory) says that it have not always been like this…. same as @cbrherms
How to eliminate the warning?
@husa570 can you (or somebody else) please re-open this issue? It is a pain to maintain different keepalived.conf
files on every node merely to get rid of this noise which is flooding the log. I would think keepalived should not be sending an advert to itself, or at the very least please suppress the log message for that case.
I can confirm that I have this same issue.
bump on this.
same problem.
knock -knock , I've met the same ((
=(
Same issue here after updating to current release.
Same issue
In case anyone else runs into this issue, I came up with a hacky workaround by setting cmd
to /bin/sh
and args to ["-c", "<the below script>"]
script:
set -eux
# Parse existing ip addresses assigned to specified interface
export IPV4_ADDRESSES=$(ip a show dev $KEEPALIVED_INTERFACE | grep "inet " | sed -r "s/.*inet ([0-9.]+).*/\1/g")
# Remove each found address from KEEPALIVED_UNICAST_PEERS
for ADDRESS in $IPV4_ADDRESSES; do
# Skip indenting to make python happy.
export KEEPALIVED_UNICAST_PEERS=$(/usr/bin/python3 <<EOF
import ast, os;
existing_list = ast.literal_eval(os.environ["KEEPALIVED_UNICAST_PEERS"].split(":")[1])
filtered_list = list(filter(lambda x: x != "${ADDRESS}", existing_list))
print("#PYTHON2BASH:" + str(filtered_list))
EOF
)
done
exec /container/tool/run
(note: this assumes you're using PYTHON2BASH
and only works for IPV4)
I am sure this is somewhat fragile and there is probably a cleaner way of doing this, but basically I just overwrote the entrypoint to remove any assigned IP addresses from ${KEEPALIVED_UNICAST_PEERS}
before calling the actual entrypoint.
Would be cool to see something like this upstreamed as an experimental flag since the equivalent logic would probably better fit in startup.sh and passing multi-line variables to Docker can be annoying
Getting this warnings on the master, but I cant see any strange vrrp packets with tcpdump.
WARNING - equal priority advert received from remote host with our IP address.
Keepalive works fine its only filling the log in the master, backup log normal. The warnings logs every second, feels like the master detects its own packets. I have tested several config and versions with the same results. I tried with different prioritys on the two nodes Example of configs with the same behavior
versions
Any Idea what I done wrong? Thanks in advance!