5012 Commits

Author SHA1 Message Date
Sean Chittenden
13fb395010
Toggle AllowMissing to false to accommodate old clients without Node IDs. 2017-02-01 14:58:34 -08:00
Sean Chittenden
f3f3f73e6d
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
```
2017-02-01 14:46:25 -08:00
Sean Chittenden
c5e140c79d
Small premature optimization in isUUID().
If the length isn't `36`, return `false` immediately before firing up
the regexp engine.
2017-02-01 11:00:06 -08:00
James Phillips
0a3492595b Update CHANGELOG.md 2017-02-01 10:31:20 -08:00
James Phillips
befb0f41aa Merge pull request #2697 from hashicorp/f-gopsutil
Reintroduce the necessary vendor bits for per-node IDs
2017-02-01 10:30:26 -08:00
Sean Chittenden
fd2ae702c9
Re-cherry-pick 71d807f607589f2eb4fea4e83e3876d122c8afc0 and e2320d69b6b155d8223758415aabafc60a0e9d3b. 2017-02-01 10:27:04 -08:00
Sean Chittenden
1e5534a27a
Add missing shirou/gopsutils vendor dependencies and files that were reverted 2017-02-01 10:26:00 -08:00
Sean Chittenden
97904cec95
Catch cross-compiliation build failures at Travis. 2017-02-01 10:22:27 -08:00
Sean Chittenden
504d16fdb8 Merge branch 'master' into f-gopsutil 2017-02-01 08:44:30 -08:00
Sean Chittenden
18760e1fb5
Reintroduce the necessary vendor bits for per-node IDs
* `shirou/gopsutil`
* `shirou/w32`
2017-02-01 08:36:24 -08:00
James Phillips
63d2fc6823 Update CHANGELOG.md 2017-02-01 07:00:32 -08:00
James Phillips
ed0e419d0a Merge pull request #2695 from hashicorp/b-srv-cname
Fixes issue with missing CNAME for services with non-IP addresses set in SRV responses.
2017-02-01 06:58:38 -08:00
James Phillips
9ef05bd759 Merge pull request #2692 from Toady00/patch-1
Specify PUT for agent maintenance endpoint
2017-02-01 06:58:20 -08:00
James Phillips
5f5680cfda Merge pull request #2666 from hashicorp/sethvargo-patch-1
Say which ec2 perms to use
2017-02-01 06:57:07 -08:00
James Phillips
e9cc66ab51
Fixes issue with missing CNAME for services with non-IP addresses set in SRV responses. 2017-01-31 20:57:50 -08:00
James Phillips
893422eac7 Update CHANGELOG.md 2017-01-31 19:14:29 -08:00
James Phillips
1470b862ec Merge pull request #2694 from hashicorp/revert-2691-f-gopsutil
Revert "Adds gopsutil in the loop when trying to make the node ID."
2017-01-31 19:14:17 -08:00
James Phillips
91f3555dd8 Revert "Adds gopsutil in the loop when trying to make the node ID." 2017-01-31 19:13:49 -08:00
James Phillips
d07f0f3d44 Update CHANGELOG.md 2017-01-31 19:04:48 -08:00
James Phillips
631e99ca2c Merge pull request #2691 from hashicorp/f-gopsutil
Adds gopsutil in the loop when trying to make the node ID.
2017-01-31 19:02:51 -08:00
James Phillips
e2320d69b6
Gets rid of a goto. 2017-01-31 19:02:25 -08:00
Brandon Dennis
7f9649b6af Specify PUT for agent maintenance endpoint
Through most of the documentation if the method isn't specified it should be a `GET` request, but here it should be a `PUT`.
2017-01-31 16:00:27 -05:00
James Phillips
71d807f607
Adds gopsutil into node ID process and attempts to use host ID, if availabile. 2017-01-31 08:51:33 -08:00
James Phillips
9d27dadedb
Adds gopsutil to vendored deps. 2017-01-31 08:51:25 -08:00
James Phillips
a64dea878b Merge pull request #2688 from ryon/master
Add Google Tag Manager #GTM-NR2SD7C
2017-01-27 13:33:27 -08:00
Ryon Coleman
2f111f2e4d Add Google Tag Manager #GTM-NR2SD7C 2017-01-27 15:41:42 -05:00
James Phillips
af766b6a6f Merge pull request #2687 from hashicorp/add-vault-to-ecosystem
docs: Added 'vault' to ecosystem page
2017-01-27 10:25:54 -08:00
vishalnayak
4fc92300f3 docs: Added 'vault' to ecosystem page 2017-01-27 13:19:19 -05:00
James Phillips
2d58f69e59 Merge pull request #2685 from jdanekrh/patch-1
Update README.org
2017-01-27 09:34:11 -08:00
Jiří Daněk
afe846a542 Update README.org 2017-01-27 18:19:47 +01:00
James Phillips
ee0bc8db0b Merge pull request #2684 from hashicorp/b-early-acls
Fixes up ACL timing issues with unit tests.
2017-01-26 22:32:18 -08:00
James Phillips
585958746a
Lets the leave unit test proceed even after an EOF. 2017-01-26 22:22:18 -08:00
James Phillips
dcff5137f9
Adds a little wait after we get the event we were seeking. 2017-01-26 22:15:54 -08:00
James Phillips
3967cfe833 Merge pull request #2683 from hashicorp/f-unit-test-robustify
Robustifies unit tests.
2017-01-26 17:36:40 -08:00
James Phillips
8493d239ac
Run the waited-for function before sleeping, and ramp up the sleep exponentially. 2017-01-26 17:11:16 -08:00
James Phillips
8c33ddbee2
Drops the unit test wait time back down and turns initial wait into blocking query. 2017-01-26 16:57:44 -08:00
James Phillips
1ca6c9bff3 Update CHANGELOG.md 2017-01-26 15:38:03 -08:00
James Phillips
768325ca2b Builds with Go 1.7.5 in Travis. 2017-01-26 15:03:18 -08:00
James Phillips
de03535fae Merge pull request #2682 from hashicorp/slackpad-patch-1
Bumps Go version up to 1.7.5.
2017-01-26 15:01:11 -08:00
James Phillips
60b3f625ac Bumps Go version up to 1.7.5. 2017-01-26 15:01:03 -08:00
James Phillips
3da73be55c Updates to Consul 0.7.3. 2017-01-26 10:16:11 -08:00
James Phillips
1f903547b5 Bumps the wait even more. 2017-01-26 09:15:29 -08:00
James Phillips
60b82c5b61 Update CHANGELOG.md 2017-01-26 09:15:05 -08:00
James Phillips
c1d3666ca6 Puts tree in 0.7.4 dev mode. 2017-01-26 09:14:18 -08:00
James Phillips
a90bb8f021
Release v0.7.3 v0.7.3 2017-01-26 08:36:09 -08:00
James Phillips
cfd7c22f8a
Puts the tree in 0.7.3 release mode. 2017-01-26 08:23:46 -08:00
James Phillips
2f0e4f7663 Merge pull request #2680 from hashicorp/slackpad-patch-1
Bumps the wait a little more.
2017-01-26 08:21:44 -08:00
James Phillips
86368a467e Bumps the wait a little more. 2017-01-26 08:20:43 -08:00
James Phillips
b4bbd2f441 Adds more time to WaitForResult.
The last change here made the time overall theoretically the same, but the overhead of running so quickly before probably meant that we were spending longer. Tests seemed marginal in Travis so doubling this to see how things go.
2017-01-26 08:04:48 -08:00
James Phillips
0e6d482f99 Merge pull request #2679 from hashicorp/b-leader-test
Tweaks leader test now that we have new wait timing.
2017-01-25 22:13:04 -08:00