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
Configure unicast_hosts dynamically on non-AWS clusters via search
#40
Comments
Could you be more specific, please? Currently, the cookbooks leaves discovery in default settings (multicast), and just configures the AWS environments. I like the solution you did in the attached commit: if the |
Sure, I can be more specific. My thought process was such that rather than having to rely on manually entering unicast hosts into an attribute we should be able to detect the unicast host based on systems in the same environment with the same clustername specified. When doing this we should also be sensitive to which network interface is utilized for the unicast discovery (should be the same interface we expect to use for publish_host. See pull request https://github.com/karmi/cookbook-elasticsearch/pull/39) for situations where systems may span multiple private networks. I think the above solution is a good starting point. If you agree, we can go that route initially while we flesh out something more extensible and automated. I would like to also do similar unicast host discovery on openstack and rackspace cloud in the same manner as we are doing on AWS hosts in this cookbook. Does that all make sense? |
Yes, that makes perfect sense! Node "auto-discovery" could be implemented via the Chef search integration in attributes/recipes, but we need to prevent unnecessary cluster restarts and other problems. On top of setting hosts, we may also support setting Note, thate the changes on the configuration branch should now fully support the case from benattar/cookbook-elasticsearch@fbbb82c (setting hosts statically, by configuration). |
Yes, I agree, we need better gateway configurations and some better methods to prevent cluster restarts. |
To summarize:
TODOS
|
is anyone else working on this? if not, I've got to make this work locally. |
Wow. Sorry for the spam everyone. |
Fixed (with doc) in #116 |
I think this cookbook still misses something. The scenario is the following: start a chef node with ES, multicast disable, unicast enable. Being the first node, it will search for other nodes in the chef environment, but won't find any, so the unicast hosts will be an empty array. Then we start a second node, which will find the first node, will consider it as master and will have in the unicast hosts the first node ip address. But if you kill the master node and restart it, how will it find the new elected master(the second node)? |
Current cookbook only addresses unicast configuration for systems running under AWS and uses some cleaver logic to populate unicast_hosts using the AWS API. Great solution but it unfortunately leaves those on non-AWS environments without multicast on their networks out in the cold. I have a commit that allows setting the unicast_hosts via an attribute but that sort of defeats the beauty of chef.
I'm opening this issue and would like some feedback from others to solve this intelligently.
My current kludge to fix this is here:
benattar@fbbb82c
Thoughts?
The text was updated successfully, but these errors were encountered: