Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malformed unicast peer #40

Open
sine19 opened this issue Mar 10, 2020 · 6 comments
Open

malformed unicast peer #40

sine19 opened this issue Mar 10, 2020 · 6 comments

Comments

@sine19
Copy link

sine19 commented Mar 10, 2020

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

@Soren90
Copy link

Soren90 commented Mar 11, 2020

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

@Soren90
Copy link

Soren90 commented Mar 12, 2020

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']"

@NoPerfectName
Copy link

NoPerfectName commented May 22, 2020

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?

@sine19
Copy link
Author

sine19 commented May 22, 2020

@NoPerfectName Try to use is like this

"KEEPALIVED_UNICAST_PEERS=#PYTHON2BASH:['10.4.52.12','10.4.52.6']"

@linkvt
Copy link

linkvt commented Nov 22, 2020

@BertrandGouny this ticket can be closed.

@BarryLuijten
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants