docker-keepalived
docker-keepalived copied to clipboard
malformed unicast peer
Im getting this error when starting keepalived docker
(Line 21) Configuration error: VRRP instance[VI_1] malformed unicast peer address[#PYTHON2BASH:['xx.x.xx.x','xx.x.xx.xx']]. Skipping...
Any idea what it is?
I'm using the 2.0.17 version and updated it to the latest stable version 2.0.20. Still the same issue
startup.sh seems to never convert the yaml string to bash (line 28):
for peer in $(complex-bash-env iterate KEEPALIVED_UNICAST_PEERS)
do
sed -i "s|{{ KEEPALIVED_UNICAST_PEERS }}|${!peer}\n {{ KEEPALIVED_UNICAST_PEERS }}|g"
${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
done
sed -i "/{{ KEEPALIVED_UNICAST_PEERS }}/d"
${CONTAINER_SERVICE_DIR}/keepalived/assets/keepalived.conf
I took a closer look into into complex-bash-env and it doesn't seem to interpret "#PYTHON2BASH:" at all
We have found the issue. The KEEPALIVED_UNICAST_PEERS variable had quotes in it, which made the PYTHON2BASH not work:
[root@keepalived system]# docker exec -it keepalived bash
bash-5.0# env
KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['10.4.52.12','10.4.52.6']"
We have found the issue. The KEEPALIVED_UNICAST_PEERS variable had quotes in it, which made the PYTHON2BASH not work:
[root@keepalived system]# docker exec -it keepalived bash bash-5.0# env KEEPALIVED_UNICAST_PEERS="#PYTHON2BASH:['10.4.52.12','10.4.52.6']"
I have the same problem,Has someone solved it?
@NoPerfectName Try to use is like this
"KEEPALIVED_UNICAST_PEERS=#PYTHON2BASH:['10.4.52.12','10.4.52.6']"
@BertrandGouny this ticket can be closed.
It works when using this format (i.e. using no double quotes at all): KEEPALIVED_UNICAST_PEERS=#PYTHON2BASH:['1.1.1.1', '1.1.1.2', '1.1.1.3'] I'm using an env-file instead of command line variables, so that may be of influence.