-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
DNS lookup by Consul node ID #2702
Merged
Merged
Commits on Feb 1, 2017
-
Small premature optimization in
isUUID()
.If the length isn't `36`, return `false` immediately before firing up the regexp engine.
Configuration menu - View commit details
-
Copy full SHA for c5e140c - Browse repository at this point
Copy the full SHA c5e140cView commit details -
Enable looking up consul nodes by their node ID.
Assuming the following output from a consul agent: ``` ==> Consul agent running! Version: 'v0.7.3-43-gc5e140c-dev (c5e140c+CHANGES)' Node ID: '40e4a748-2192-161a-0510-9bf59fe950b5' Node name: 'myhost' ``` it is now possible to lookup nodes by their Node Name or Node ID, or a prefix match of the Node ID, with the following caveats re: the prefix match: 1) first eight digits of the Node ID are a required minimum (eight was chosen as an arbitrary number) 2) the length of the Node ID must be an even number or no result will be returned. ``` % dig @127.0.0.1 -p 8600 myhost.node.dc1.consul. myhost.node.dc1.consul. 0 IN A 127.0.0.1 % dig @127.0.0.1 -p 8600 40e4a748-2192-161a-0510-9bf59fe950b5.node.dc1.consul. 40e4a748-2192-161a-0510-9bf59fe950b5.node.dc1.consul. 0 IN A 127.0.0.1 % dig @127.0.0.1 -p 8600 40e4a748.node.dc1.consul. 40e4a748.node.dc1.consul. 0 IN A 127.0.0.1 % dig @127.0.0.1 -p 8600 40e4a74821.node.dc1.consul. 40e4a74821.node.dc1.consul. 0 IN A 127.0.0.1 % dig @127.0.0.1 -p 8600 40e4a748-21.node.dc1.consul. 40e4a748-21.node.dc1.consul. 0 IN A 127.0.0.1 ```
Configuration menu - View commit details
-
Copy full SHA for f3f3f73 - Browse repository at this point
Copy the full SHA f3f3f73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13fb395 - Browse repository at this point
Copy the full SHA 13fb395View commit details -
Configuration menu - View commit details
-
Copy full SHA for e86cefe - Browse repository at this point
Copy the full SHA e86cefeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 854f2b2 - Browse repository at this point
Copy the full SHA 854f2b2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 295ca81 - Browse repository at this point
Copy the full SHA 295ca81View commit details -
Treat a uuid prefix lookup error as a soft error, as if a node name l…
…ookup returned nil. Add a TODO to note where a future point of logging should occur once a logger is present.
Configuration menu - View commit details
-
Copy full SHA for 62527c1 - Browse repository at this point
Copy the full SHA 62527c1View commit details
Commits on Feb 2, 2017
-
Treat a uuid prefix lookup error as a soft error, as if a node name
lookup returned nil. Add a TODO to note where a future point of logging should occur once a logger is present and a few additional comments to explain the program flow.
Configuration menu - View commit details
-
Copy full SHA for c16f334 - Browse repository at this point
Copy the full SHA c16f334View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.