-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add mDNS provider option using hashicorp/mdns library #28
Conversation
113b17d
to
35a5ded
Compare
Any thoughts on this? |
This is interesting, @leprechau! I think the stated goal of go-discover is to support specifically cloud environments, where I believe mdns is not usually possible. Conceptually though, it does seem similar to me so I get the addition. I will try to track someone down to give you a more authoritative answer on the subject! |
@pearkes I get the cloud focus, however this is also the discovery library used within Consul. I think having the ability for Consul nodes to discover each other via mDNS on a lan segment or within an isolated Docker network could be very useful. |
Okay @leprechau -- after a bit of discussion within HashiCorp I think we should figure out how to get this in 😄. Do you think integration testing similar to how we have for the cloud providers would make sense here? https://github.com/hashicorp/go-discover/tree/master/test/tf Another housekeeping note, it'd be great to update the readme with the mDNS provider listed as part of this. We'll come back around for a formal review. |
@pearkes I updated the readme to document the mDNS option. To the integration tests, I thought about that when I first built the PR. It should be possible to spin up a docker container running an mDNS server and exec |
Ideally I'd like to see this merged and then submit another PR to Consul to allow it to publish it's own mDNS records. We could then build an integration test that spun up consul in a container and have |
@leprechau fair, it'd be great to follow the pattern we have currently of being able to test it independent of HashiCorp tools (I can imagine Nomad wanting to integrate this as well as Consul!). If we can figure out a decent way that'd be great. In the meantime we'll get a review done here soon! |
@pearkes thank you. I added a simple integration test into the provider package. It now validates config and spins up a test local mDNS server and then uses the provider to query for the service. |
@pearkes any updates on getting this merged? If the above comment is the only feedback on the overall PR I consider it done. |
@leprechau Haven't had a chance to review the implementation or experiment with it which should be brief but is something we should do prior to merging. Definitely in the queue to look at in the next couple of weeks. |
@pearkes Thank you sir, appreciate the update. |
Any progress? there have been a lot of "couple of" weeks since May 1st … ;-) |
I'm still interested in getting this in and adding mDNS server/broadcast support to Consul in a follow-up PR once we have the go-discover side done. |
Any progress? |
@pearkes Anything I can do to help get this moved along? |
@alvin-huang are you supporting go-discover now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job. Couldn't find any concerns. We are interested in seeing what the upstream agent integration looks like in Consul.
Apologies it took us so long to get this merged, notably with little feedback. I think initially there was some concern for committing to a non-standard "cloud" discovery option. Clearly this was too risk-averse, and the potential impact is quite low of getting this in master. Thank you for your contribution and importantly, your patience!
We welcome docs in upstream Consul, with the implementation of listening for requests in the agent as a more involved review. If you have questions about that, feel free to open an issue there.
Adding an mDNS provider option for us on a private lan segment. I plan to leverage this in an upcoming PR to add mDNS advertisements to consul agents in server mode via the same library.