-
Notifications
You must be signed in to change notification settings - Fork 252
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
[zookeeper] multi-node setup issue #497
Comments
Would it be possible to take advantage of dynamic configuration in zookeeper instead? https://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html#ch_reconfig_dyn You would basically not template out the config but design your hooks to make API calls to add and remove nodes. |
I believe that there are still some issues here that are hard to solve. Like the fact that there should be a stable mapping of the habitat supervisor -> zookeeper id. |
@bdangit see the two issues I opened up on habitat-sh/habitat Furthermore, there are several misconfigurations possible according to https://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html, which I'm not sure that we can prevent from happening. We'd need some shared distributed memory with proper atomic operations to perform those re-configurations. |
Hrmm. I see. Wouldn't we run into an issue where all the nodes would have to be reconfigured because the template is changing? If done via dynamic reconfigure, a node could gather cluster health from Zookeeper and let Zookeeper routines manage addition/removal of nodes. |
To make sure that we're on the same page: we definitely should use the We'll check if we can implement this once habitat-sh/habitat#2224 is implemented. |
@moretea yep agree with |
We hit this in triage today! This is still a feature we want and the two referenced issues on the habitat core repo are probably the best place to track any early work on this. Without those two features we can't sanely implement this feature in the plan. |
If you add special cased helper functions, you'll eventually hit another use case that you had not envisioned before, and will be unable to implement. There are two options to solve this problem IMHO. Proper programming languageFor example, https://github.com/dhall-lang/, which gives you strong termination guarantees, and does not allow you to write random programs doing random IO (unlike how Ruby is used for Chef). Enable external dynamic behaviorThis idea is close to how Kubernetes' Controllers work, except that you'd elect a single controller in one of the supervisors in a ring. This Controller would read a stream of events on |
I am currently trying to add support for multi-node in zookeeper plan.
All nodes have to be named in the config in the form of
I wanted to use @index from the svc context, but the id value must be between 1 and 255, and index starts at 0.
as http://handlebarsjs.com/ does not support expression and evaluation, I get stuck here unless I write some kind of helper, which I think will be complicated to add as it complexify the template language.
Does someone have a idea how I can bypass this restriction ?
The text was updated successfully, but these errors were encountered: