Skip to content
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

Not Easy Finding the "First Peer" without DNS #849

Open
fujin opened this issue Jun 14, 2016 · 13 comments
Open

Not Easy Finding the "First Peer" without DNS #849

fujin opened this issue Jun 14, 2016 · 13 comments
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature

Comments

@fujin
Copy link
Contributor

fujin commented Jun 14, 2016

It would be dope if I could say this by name and let it figure out the IP address. Should I be adding DNS for it? Something like skydns2/Consul-based DNS to "find" leaders?

Please close if invalid, I may not have figured out the correct way to do this.

Observed: all/current

hab start -t leader core/redis --peer 172.17.0.4

Expected:

hab start -t leader core/redis --friends

@adamhjk
Copy link
Contributor

adamhjk commented Jun 14, 2016

We haven't really decided what to do here. One thing we've thought is that you should have a few, static supervisors with persistence turned on. Then you can use those for the bootstrapping.

One idea we had was that we should build a simple service that handles taking configuration out of source control and managing the revisions in the ring - and that could be the central "core" peer.

Certainly you could put that in an round robin DNS. Happy to hear other thoughts.

@spheromak
Copy link

@adamhjk CoreOS did a simple bootstrapping service for etcd where you would register to that, and then it could reflect to your registered supervisors. So some sort of simple external/bootstrap service registry. You could also add support for consul/etcd/ZK directly for that role for folks that might already have service disco laying around.

@janeczku
Copy link

One option would be to use mDNS to auto-discover peers for bootstrapping.

@adamhjk
Copy link
Contributor

adamhjk commented Jun 23, 2016

I don't actually understand what the upside of adding a consul/etcd/zk support would be here - you would have to specify those peers in order to figure out the peers from them. It's the same problem, just pushed to another layer of infrastructure.

mDNS is a good idea.

Our wire protocol is pretty simple - another choice would be to do a sweep of each interfaces address space, sending a small UDP packet. Extend the protocol inside habitat to let it be a discovery ping, with an ack(peer) on reply.

@smurawski
Copy link
Contributor

We definitely need to tackle this problem, but for the time being having a few static peers or DNS entry that points to one (or more) long lived peers gets us going. After there's a bit more stuff out running in a supervisor, we might have a better idea of where to put the effort into solving the "first peer" problem.

@smurawski smurawski changed the title Gossip leader IP address must be copied from the output of logs to the --peer argument of another supervisor instantiation Not Easy Finding the "First Peer" Jan 17, 2017
@moretea
Copy link

moretea commented Feb 2, 2017

This would be an issue in a kubernetes deployment as well.

@bdangit
Copy link
Contributor

bdangit commented Feb 2, 2017

Agree with @moretea. I had posted this on the forum to get some ideas on how to alleviate this pain. https://forums.habitat.sh/t/kubernetes-and-habitats-service-discovery/165

@moretea
Copy link

moretea commented Mar 16, 2017

@jamessewell
Copy link
Contributor

Any progress here?

@christophermaier
Copy link
Contributor

I believe this is handled in Kubernetes with the Habitat Operator and the --peer-watch-file option, but we haven't yet done anything for "pure Habitat" along these lines just yet (e.g. mDNS, etc.)

@christophermaier christophermaier removed their assignment Jun 20, 2018
@baumanj baumanj changed the title Not Easy Finding the "First Peer" Not Easy Finding the "First Peer" without DNS Dec 19, 2018
@stale
Copy link

stale bot commented Apr 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Apr 2, 2020
@christophermaier christophermaier added Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Type: Feature Issues that describe a new desired feature and removed A-supervisor labels Jul 24, 2020
@stale stale bot removed the Stale label Jul 31, 2020
@stale
Copy link

stale bot commented Aug 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

@stale stale bot added the Stale label Aug 13, 2022
@stale
Copy link

stale bot commented May 22, 2023

This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Focus:Supervisor Related to the Habitat Supervisor (core/hab-sup) component Stale Type: Feature Issues that describe a new desired feature
Projects
None yet
Development

No branches or pull requests