James Phillips
00605c0214
Shows the segment name in the keyring API and command output.
2017-09-07 12:17:39 -07:00
James Phillips
1a117ba0a8
Makes the all segments query explict, and the default for `consul members`.
2017-09-05 12:22:20 -07:00
Kyle Havlovitz
20296d4a89
Change segment list endpoint in docs/client api
2017-09-01 12:40:07 -07:00
Kyle Havlovitz
62102a537e
Organize segments for a cleaner split between enterprise and OSS
2017-08-31 17:39:46 -07:00
Kyle Havlovitz
21513b0393
Update coord display in ui to account for segments
2017-08-30 11:58:29 -07:00
Kyle Havlovitz
2ada0439d4
Add rpc_listener option to segment config
2017-08-30 11:58:29 -07:00
James Phillips
b1a15e0c3d
Adds open source side of network segments (feature is Enterprise-only).
2017-08-30 11:58:29 -07:00
Illirgway
e0cc1ce679
Fix bug with unused (replaced with "") CONSUL_HTTP_AUTH in some places
...
example: https://github.com/hashicorp/consul/blob/master/watch/plan.go#L26
conf := consulapi.DefaultConfig()
conf.Address = address
conf.Datacenter = p.Datacenter
conf.Token = p.Token # <-- replace Token from DefaultConfig/CONSUL_HTTP_AUTH with ""
client, err := consulapi.NewClient(conf)
how to reproduce bug:
0. consul -> localhost:8500 with more than 0 service checks
1. deny all for anonymous token
2. create appropriate acl <token> for watch checks (agent:read + node:read,service:read)
3. bash:
CONSUL_HTTP_AUTH=<token> consul watch -http-addr=localhost:8500 -type=checks # --> return []
consul watch -http-addr=localhost:8500 -type=checks -token=<token> # -> return { .... right json result .... }
2017-08-16 01:51:18 +03:00
James Phillips
6ccf724c0c
Adds a guard to make sure that empty log lines don't close consul monitor.
...
Fixes #3253 .
2017-08-08 16:05:29 -07:00
Kyle Havlovitz
5b998cacb1
Update api structs for metrics endpoint
2017-08-08 12:33:59 -07:00
Kyle Havlovitz
d5634fe2a8
Add support for labels/filters from go-metrics
2017-08-08 01:45:10 -07:00
James Phillips
4bee2e49f5
Adds secure introduction for the ACL replication token. ( #3357 )
...
Adds secure introduction for the ACL replication token, as well as a separate enable config for ACL replication.
2017-08-03 15:39:31 -07:00
James Phillips
c0a5ad7903
Adds a new /v1/acl/bootstrap API ( #3349 )
2017-08-02 17:05:18 -07:00
James Phillips
496b0bcf07
Adds support for agent-side ACL token management via API instead of config files. ( #3324 )
...
* Adds token store and removes all runtime use of config for ACL tokens.
* Adds a new API for changing agent tokens on the fly.
2017-07-26 11:03:43 -07:00
Kyle Havlovitz
19eae3d14b
Add UpgradeVersionTag to autopilot config
2017-07-18 13:35:41 -07:00
James Phillips
1791d99a10
Adds new config to make script checks opt-in, updates documentation. ( #3284 )
2017-07-17 11:20:35 -07:00
James Phillips
8d0a048408
Expands and rework context support in the API client. ( #3273 )
2017-07-14 17:30:08 -07:00
James Bardin
deb43fea6b
accept recv-only channels for cancellations ( #3271 )
...
Cancellation channels are often derived from a Context, which
returns a directional `<-chan struct{}` from Done(). In order to use
this with parts of of the consul API, one is required to create a new
channel and dispatch a separate goroutine to watch for context
cancellation and close the new channel.
Changing the signature for the methods that take cancellation channels
will allow easier integration with existing uses of Context. Since the
cancellation pattern only reads from these channels, there should be no
backwards incompatibility with existing codebases, and most of the
methods already accept only the correct type.
2017-07-14 16:31:44 -07:00
Frank Schroeder
9c54f30c94
api: fix TestAPI_CatalogNodes test
2017-07-07 09:22:34 +02:00
Frank Schroeder
0e931a713c
agent: fix failing test from localState decoupling
...
Would be nice to know what changed though.
2017-07-07 09:22:34 +02:00
Frank Schroeder
7bbfef7000
api: refactor: unify naming of API tests
2017-07-07 09:22:34 +02:00
Frank Schroeder
8edeabce9a
api: refactor: prefix all API tests with API_
2017-07-07 09:22:34 +02:00
Preetha Appan
9eaf56bfe3
Fix socket file handle leaks from old blocking queries upon consul reload. This fixes issue #3018
2017-06-26 15:52:03 -05:00
Frank Schröder
825f72f5ef
agent: support custom header and method for http checks ( #3106 )
...
This patch adds support for custom headers and
method for HTTP checks.
Fixes #2474
Fixes #2657
Fixes #3106
2017-06-07 01:11:56 +02:00
James Phillips
3baa703d02
Merge pull request #3077 from jwasinger/issue-2850
...
Prevent Session.Destroy from leaving open TCP connections
2017-06-02 21:43:55 -07:00
Jared Wasinger
d2ef61d079
Prevent Session.Destroy from leaving open TCP connections
2017-05-25 20:51:27 -07:00
Kyle Havlovitz
4e44db87e3
Don't overwrite Transport's TLS config if it's been set
2017-05-24 13:45:19 -07:00
Kyle Havlovitz
04f1ff78f8
Remove superfluous default HttpClient check in NewClient
2017-05-24 11:40:21 -07:00
Frank Schroeder
96c677fdba
test: make test less flaky
2017-05-12 22:12:47 +02:00
Frank Schroeder
65b5c51ec7
test: add helper for ioutil.TempDir/TempFile
...
This creates a simplified helper for temporary directories and files.
All path names are prefixed with the name of the current test.
All files and directories are stored either in /tmp/consul-test
or /tmp if the former could not be created.
Using the system temp dir breaks some tests on macOS where the unix
socket path becomes too long.
2017-05-12 22:12:47 +02:00
Frank Schroeder
3522a41bad
test: include test name in temp file/dir
...
This helps identifying hanging tests by looking
at the process list.
2017-05-12 22:12:47 +02:00
James Phillips
c1d196152f
Fixes vet errors.
2017-05-09 06:48:52 -07:00
James Phillips
ddfa57765c
retry: Removes the description parameter.
2017-05-05 17:07:03 +02:00
Frank Schroeder
21a82a0a16
test: Refactor WaitForResult tests with retry
...
Refactor tests that use testutil.WaitForResult to use retry.
Since this requires refactoring the test functions in general this patch
also shows the use of the github.com/pascaldekloe/goe/verify library
which provides a good mechanism for comparing nested data structures.
Instead of just converting the tests from testutil.WaitForResult to
retry the tests that performing a nested comparison of data structures
are converted to the verify library at the same time.
2017-05-05 17:07:02 +02:00
Kyle Havlovitz
cd56a5ebdd
Add separate option for verifying incoming HTTPS traffic ( #2974 )
...
* Add separate option for verifying incoming HTTPS traffic
2017-04-28 16:15:55 -07:00
Frank Schroeder
9685bdcd0b
api: Add ServiceTags to Health state endpoint ( #153 )
...
This patch adds the ServiceTags to the /v1/health/state/<state>
endpoint.
Fixes #153
2017-04-28 15:00:08 -07:00
James Phillips
05b1cabba9
Merge pull request #2947 from bogdanov1609/added_ACLReplication
...
API: Add ACLReplication
2017-04-25 16:50:52 -07:00
James Phillips
36725cef11
Tweaks ACL replication struct name.
2017-04-25 16:32:09 -07:00
James Phillips
138abeb5f7
Tweaks ACL replication status struct name.
2017-04-25 16:31:20 -07:00
Frank Schroeder
3e00e36f41
golint: Untangle if blocks with return in else
2017-04-25 09:26:13 -07:00
Ivan Bogdanov
1ebd6402fd
API: Add ACLReplication
2017-04-25 00:39:50 +03:00
Frank Schröder
6dd2804d09
Issue #2905 : Add check-not-exists to TXN endpoint
...
This patch adds support for asserting that a given
key does not exist in the KV store.
Fixes #2905
2017-04-20 17:50:52 -07:00
Kyle Havlovitz
c6d0b4cf90
Make the API client's httpClient more pluggable ( #2926 )
2017-04-18 16:39:23 -07:00
Frank Schröder
c40621ae10
Add datacenter to catalog node API ( #2917 )
...
This patch stores the datacenter of a node in memdb
and exposes it via the API in all places where a Node
structure is returned.
* /catalog/nodes
* /catalog/node/:node
* /catalog/service/:service
* /health/service/:service
* /query/:uuid/execute
2017-04-18 05:02:24 -07:00
Kyle Havlovitz
ae6bf56ee1
Add tls client options to api/cli
2017-04-14 13:37:29 -07:00
Brian Shumate
f499584c38
API: Add struct fields, fixes #2882
...
- Add CreateIndex and ModifyIndex to AgentService
- Add CreateIndex and ModifyIndex to Node
2017-04-13 11:36:19 -04:00
James Phillips
08f81ebddb
Moves operator sub-functions into their own files.
2017-03-30 12:35:50 -07:00
Kyle Havlovitz
da9c825592
Add CLI/API endpoints for removing peer by ID
2017-03-30 10:13:32 -07:00
Seth Vargo
0170a28ec9
Use new APIs
2017-03-23 18:48:13 -04:00
Kyle Havlovitz
390f41d8d5
Add advanced autopilot features
2017-03-22 15:25:16 -07:00