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

CIDR or wildcards support for auto-join #3665

Closed
guestisp opened this issue Nov 8, 2017 · 9 comments
Closed

CIDR or wildcards support for auto-join #3665

guestisp opened this issue Nov 8, 2017 · 9 comments

Comments

@guestisp
Copy link

guestisp commented Nov 8, 2017

Please add support for CIDR or wildcards (ie 192.168.*.*) for -auto-join argument.

This would be great on local lan when you have a subnet hosting consul services that should be joined together

@guestisp guestisp changed the title CDIR or wildcards support for auto-join CIDR or wildcards support for auto-join Nov 8, 2017
@magiconair
Copy link
Contributor

Would this mean trying to join all 65535 (=256*256) possible addresses? I think this might be a feature for https://github.com/hashicorp/go-sockaddr if that isn't already supported.

@guestisp
Copy link
Author

It depends on the user...
Currently I use something more useful like 192.168.0.0/28 and is working properly

@slackpad
Copy link
Contributor

Agree with @magiconair on this one I think if we run the retry-join string through the go-sockaddr parser we can leverage that for this (not sure if we need a change there) - that would avoid a special case in Consul and would expose anything that go-sockaddr templates can do, which is quite a lot.

@slackpad
Copy link
Contributor

Hi, this never made it on the roadmap, and it's not a very high priority for us. We would gladly review a PR for this functionality, but we are going to close this issue since it's not something we are going to implement ourselves (this would possibly need a PR against go-sockaddr and then a small update to Consul to run the retry-join address through the go-sockaddr template parser).

@guestisp
Copy link
Author

Ok but as simple work around is still useful
Currently it's impossible to automatically join a set of nodes without using external services.

This PR will fix this. Obviously it can be made better, but is a simple temporary fix

@slackpad
Copy link
Contributor

Hi @guestisp I definitely understand it's a simple code change but then we have to support it and transition to the new syntax for go-sockaddr later, update documentation, etc. In the long run it ends up being a lot of work for us. The go-sockaddr approach is more work to implement but has a flexible syntax for adding more features later and is a good logical fit for other types of address operations that folks will inevitably want.

@guestisp
Copy link
Author

I've seen that a related PR was merged.
Is now possible to specify a CIDR range ? If yes, how ?

@guestisp
Copy link
Author

Any help ?

@banks
Copy link
Member

banks commented May 24, 2018

@guestisp this is a closed issue. We now support sockaddr templates for retry join which means any feature supported there can be used. You can read docs for go-sockaddr to see what is possible. If you need something extra consider a PR to go-sockaddr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants