Giter VIP home page Giter VIP logo

Comments (6)

Soren90 avatar Soren90 commented on May 29, 2024

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

from docker-keepalived.

Soren90 avatar Soren90 commented on May 29, 2024

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

from docker-keepalived.

NoPerfectName avatar NoPerfectName commented on May 29, 2024

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?

from docker-keepalived.

sine19 avatar sine19 commented on May 29, 2024

@NoPerfectName Try to use is like this

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

from docker-keepalived.

linkvt avatar linkvt commented on May 29, 2024

@BertrandGouny this ticket can be closed.

from docker-keepalived.

BarryLuijten avatar BarryLuijten commented on May 29, 2024

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.

from docker-keepalived.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.