-
Notifications
You must be signed in to change notification settings - Fork 68
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
Incorrect cfg for clustering? #26
Comments
Hi @ken-tune . Presumably based on your usage of 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
Presumably the I don't know how you currently tag your EC2 instances but you could specify this value on a tag there, e.g. named 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. |
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.3=ip-10-0-0-65.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. |
Closing due to inactivity and not something I will be able to get to in the short term |
First - thanks for putting together this great resource.
I've found that if I try and 'cluster' by doing something like
hosts: "{{ kafka_tag }}"
remote_user: "{{ os_config['remote_user'] }}"
become: yes
vars:
kafka_version: "2.8.1"
zookeeper_servers: "{{ groups[kafka_tag] }}"
zookeeper_id: "{{ groups[kafka_tag].index(inventory_hostname) + 1}}"
vars_files:
roles:
the zoo.cfg ends up as
server.1=ip-10-0-0-65.ec2.internal:2888:3888
server.1=ip-10-0-1-234.ec2.internal:2888:3888
server.1=ip-10-0-2-207.ec2.internal:2888:3888
whereas it should be something like
server.1=ip-10-0-0-65.ec2.internal:2888:3888
server.2=ip-10-0-1-234.ec2.internal:2888:3888
server.3=ip-10-0-2-207.ec2.internal:2888:3888
otherwise all the servers end up in standalone mode.
See https://mail-archives.apache.org/mod_mbox/zookeeper-user/202111.mbox/browser
I don't know if this is easily fixable? I can try and look into it if you like.
The text was updated successfully, but these errors were encountered: