Giter Site home page Giter Site logo

Comments (3)

sleighzy avatar sleighzy commented on May 30, 2024

Hi @ken-tune .

Presumably based on your usage of kafka_tag you're using AWS and dynamic inventory. What script/tooling are you using for this?

At first glance it looks like maybe you're defining this at the playbook level so it may not be evaluated per host, as opposed to using it in the host vars...? For example, if this evaluates to 1 initially and is then passed to the role as the default value then due to there not being an individual zookeeper_id on each host then it will fall back on the default. See https://github.com/sleighzy/ansible-zookeeper/blob/master/templates/zoo.cfg.j2#L48

server.{{ hostvars[host].zookeeper_id | default(zookeeper_id) }}.............

Presumably the /var/lib/zookeeper/myid file on all your nodes contain this same 1 value as well?

I don't know how you currently tag your EC2 instances but you could specify this value on a tag there, e.g. named zookeeper_id, and then use that in the host vars although I don't know how much additional overhead this adds for you.

I'll need to set aside some time to test similar config to yours locally to see if I can replicate and provide something more helpful.

from ansible-zookeeper.

ken-tune avatar ken-tune commented on May 30, 2024

Hi @sleighzy

If it helps, what's seen on the other two hosts is

server.2=ip-10-0-0-65.ec2.internal:2888:3888
server.2=ip-10-0-1-234.ec2.internal:2888:3888
server.2=ip-10-0-2-207.ec2.internal:2888:3888

&

server.3=ip-10-0-0-65.ec2.internal:2888:3888
server.3=ip-10-0-1-234.ec2.internal:2888:3888
server.3=ip-10-0-2-207.ec2.internal:2888:3888

with the content of /var/lib/zookeeper/myid matching the X in server.X in each case. So zookeeper_id is being evaluated at the host level.

I can figure out a workaround ( run a subsequent process to correct) so maybe will just leave this with you and if I have some free cycles will figure out a patch if you don't beat me to it.

from ansible-zookeeper.

Related Issues (14)

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.