Commit Graph

21 Commits

Author SHA1 Message Date
Michael Schurter
4b5b2aa1a6 Better client health check and error handling 2017-10-13 16:25:25 -07:00
Michael Schurter
71178c97a6 Agent Health Endpoint 2017-10-13 15:37:44 -07:00
Michael Schurter
4856705459 Status.Members ACL enforcement
Was incorrectly checked on the HTTP API before. Moved to RPC endpoint.
2017-10-10 10:36:54 -07:00
Michael Schurter
44dc166e5f Fix AgentSelf, AgentMembers, and KeyringOperations 2017-10-09 16:12:28 -07:00
Michael Schurter
c39a2333d9 ForceLeave endpoint must use Server.ResolveToken
The ForceLeaveRequest endpoint may only be called on servers, but the
code was using a Client to resolve tokens. This would cause a panic when
an agent wasn't both a Server and a Client.
2017-10-09 15:49:04 -07:00
Michael Schurter
e3520aded5 /v1/client/agent/* ACL enforcement 2017-10-09 12:18:54 -07:00
Alex Dadgar
e25dff5a28 Sort /v1/agent/servers output
This PR sorts the output of the endpoint since its results are used as
part of Consul checks to avoid the value changing unnecessarily.

Fixes https://github.com/hashicorp/nomad/issues/3211
2017-09-14 14:20:22 -07:00
Jeremy Voorhis
f7041f5710 Handle nil values when redacting vault token. 2017-08-08 10:54:11 -07:00
Jeremy Voorhis
5fa51080a7 Redact Vault.Token from AgentSelf response.
If Config.Vault.Token is defined, /v1/agent/self will return the string
`<redacted>`. If the token is not set, This endpoint will continue to
return the empty string.
2017-08-07 21:34:43 -07:00
Diptanu Choudhury
f766f71500 Changing the API to use the new servermember datastructure 2016-11-06 10:30:43 -08:00
Diptanu Choudhury
b57a750739 Add an RPC endpoint for server members 2016-11-06 10:16:12 -08:00
Diptanu Choudhury
f0806dceff Enable serf encryption (#1791)
* Added the keygen command

* Added support for gossip encryption

* Changed the URL for keyring management

* Fixed the cli

* Added some tests

* Added tests for keyring operations

* Added a test for removal of keys

* Added some docs

* Fixed some docs

* Added general options
2016-10-17 10:48:04 -07:00
Michael Schurter
64ac9b9359 Retry all servers on RPC call failure
rpcproxy is refactored into serverlist which prioritizes good servers
over servers in a remote DC or who have had a failure.

Registration, heartbeating, and alloc status updating will retry faster
when new servers are discovered.

Consul discovery will be retried more quickly when no servers are
available (eg on startup or an outage).
2016-09-23 11:44:48 -07:00
Sean Chittenden
dbdebcad80 golint(1) police 2016-06-10 15:54:39 -04:00
Sean Chittenden
5757e50243 Only return the Client's server addresses, never mix-in server peers 2016-06-10 15:54:39 -04:00
Sean Chittenden
f03765814e Add some trace-level logging for /v1/agent/servers when writing
This endpoint shouldn't be hit often, but this could be useful in
logs down the road.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ed30876186 Change the endpoint for /v1/agent/servers and fix tests.
When an agent is running a server, the list of servers includes the
Raft peers.  When the agent is running a client (which is always the
case?), include a list of the servers found in the Client's RpcProxy.
Dedupe and provide a unique list back to the caller.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ffcd2332d4 Rebalance Nomad client RPCs among different Nomad servers.
Implement client/rpc_proxy.RpcProxy.
2016-06-10 15:50:11 -04:00
Ryan Uber
13613e4100 agent: add HTTP endpoint for querying/modifying the server list 2015-09-24 20:39:03 -07:00
Ryan Uber
39592e63b3 command: convert members so we get a descriptive status 2015-09-14 13:24:03 -07:00
Armon Dadgar
445b90895c http: adding the agent endpoints 2015-09-06 19:08:05 -07:00