Commit Graph

57 Commits

Author SHA1 Message Date
Chelsea Holland Komlo
bbc56860ac adding additional test assertions; differentiate reloading agent and http server 2018-01-16 07:34:39 -05:00
Chelsea Holland Komlo
359358d240 code review fixups 2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
7b749579a2 add ability to upgrade/downgrade nomad agents tls configurations via sighup 2018-01-08 09:21:06 -05:00
Chelsea Komlo
fa9fd4422c Nomad agent reload TLS configuration on SIGHUP (#3479)
* Allow server TLS configuration to be reloaded via SIGHUP

* dynamic tls reloading for nomad agents

* code cleanup and refactoring

* ensure keyloader is initialized, add comments

* allow downgrading from TLS

* initalize keyloader if necessary

* integration test for tls reload

* fix up test to assert success on reloaded TLS configuration

* failure in loading a new TLS config should remain at current

Reload only the config if agent is already using TLS

* reload agent configuration before specific server/client

lock keyloader before loading/caching a new certificate

* introduce a get-or-set method for keyloader

* fixups from code review

* fix up linting errors

* fixups from code review

* add lock for config updates; improve copy of tls config

* GetCertificate only reloads certificates dynamically for the server

* config updates/copies should be on agent

* improve http integration test

* simplify agent reloading storing a local copy of config

* reuse the same keyloader when reloading

* Test that server and client get reloaded but keep keyloader

* Keyloader exposes GetClientCertificate as well for outgoing connections

* Fix spelling

* correct changelog style
2017-11-14 17:53:23 -08:00
Alex Dadgar
e1b1465081 Standardize retrieving a free port into a helper package 2017-10-23 16:48:20 -07:00
Michael Schurter
71178c97a6 Agent Health Endpoint 2017-10-13 15:37:44 -07:00
Chelsea Holland Komlo
c3006c685f improve documentation
move metrics to telemetry; copy to client config
2017-09-06 21:38:06 +00:00
Chelsea Holland Komlo
a265d86505 remove prints during test 2017-09-05 14:13:34 +00:00
Armon Dadgar
2329fbcd28 agent: thread through ACL config to Server 2017-09-04 13:04:45 -07:00
Alex Dadgar
a73e945067 More parallel 2017-07-20 09:36:34 -07:00
Michael Schurter
6c3a739031 Too lazy to remember the right formatter for floats 2017-07-19 11:53:18 -07:00
Alex Dadgar
bb45b95bc4 Allow tuning of heartbeat ttls
This PR allows tuning of heartbeat TTLs. An example of very aggressive
settings is as follows:

```
server {
  heartbeat_grace = "1s"
  min_heartbeat_ttl = "1s"
  max_heartbeats_per_second = 200.0
}
```
2017-07-19 09:38:35 -07:00
Michael Schurter
0832793fac Fix path used by Nomad Server HTTP Check
Fixes #2701
2017-06-21 10:41:28 -07:00
Michael Schurter
77d9b417c1 Skip https health check if verify_https_client is true 2017-05-03 12:19:02 -07:00
Michael Schurter
346838381b Only register HTTPS agent check when Consul>=0.7.2
Support for TLSSkipVerify in other checks coming soon!
2017-04-19 12:42:48 -07:00
Alex Dadgar
248c069652 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Michael Schurter
ec4a0d2a22 Don't require serf advertise address for clients 2016-12-02 11:07:00 -08:00
Alex Dadgar
9dc2f63240 agent tests 2016-12-01 16:27:22 -08:00
Alex Dadgar
756738d9f1 Fix TestRktDriver_PortsMapping and TestAgent_LoadKeyrings 2016-11-15 15:49:05 -08:00
Michael Schurter
3b4fe9a95b Fix typo in test 2016-11-09 13:16:56 -08:00
Michael Schurter
1304ba8b2d Addresses are just addresses - no ports
Store address+port in an unexported field for ease-of-use
2016-11-09 11:49:55 -08:00
Michael Schurter
1893772f4b Enable dev mode to allow using localhost in tests 2016-11-08 16:35:11 -08:00
Michael Schurter
4f15cac3ca Normalize configs for agent tests 2016-11-08 16:13:09 -08:00
Michael Schurter
eb89fd2793 Fix int pointer formatting and server config test 2016-11-08 16:02:20 -08:00
Alex Dadgar
f218c8849b Resolve 2016-11-01 13:23:44 -07:00
Alex Dadgar
a379f86064 Check that advertise without ports works in test 2016-10-31 18:08:49 -07:00
Alex Dadgar
b8650b24d2 Allow advertise to not specify port 2016-10-31 17:12:29 -07:00
Evan Gilman
ba55b1a0fe Never return 0.0.0.0 as a non-bind address 2016-10-27 10:51:11 -07:00
Evan Gilman
bcd0a55be9 Add more address selector tests 2016-10-27 10:51:11 -07:00
Evan Gilman
39155e952f Remove old address advertise config code 2016-10-27 10:51:11 -07:00
Evan Gilman
5a1b8db597 Add address selector methods to the agent 2016-10-27 10:51:11 -07:00
Alex Dadgar
9ff2bf0bff Fix Vault parsing of booleans 2016-10-10 18:04:39 -07:00
Alex Dadgar
b082bdd52f test fixes 2016-08-18 10:30:47 -07:00
Diptanu Choudhury
bc3aab72fc get a free port from the kernel 2016-08-16 16:05:37 -07:00
Sean Chittenden
5c118d8fdf Fix tests 2016-06-16 22:26:45 -07:00
Sean Chittenden
e5f65e5c7c Fix tests, don't take the address of DefaultConsulCommand() 2016-06-16 21:21:39 -07:00
Sean Chittenden
7dc7fcf052 Create config.DefaultConsulConfig() 2016-06-16 20:41:05 -07:00
Sean Chittenden
5331ea7bc6 goling(1) compliance pass (e.g. Rpc* -> RPC) 2016-06-10 23:38:28 -04:00
Sean Chittenden
a55395678f Fix tests for client.TestAgent_ServerConfig
Add similar logic in Agent `serverConfig()` to set up the
`serverSerfAddr` the same as `serverHttpAddr` and `serverRpcAddr`.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ce8c03d708 Advertise the server's RPC endpoint, not its HTTP endpoint.
Rename c.serverRpcAddr to serverRpcAddr.  This will be broken out
into in additional set of services in a subsequent commit.
2016-06-10 15:50:11 -04:00
Sean Chittenden
7cdf0edcfe Rename the package from client/rpc_proxy to client/rpcproxy
Also rename `NewRpcProxy()` to just `New()` to avoid package stutter.
2016-06-10 15:50:11 -04:00
Sean Chittenden
092e07f334 Create a nomad/structs/config to break an import cycle.
Flattening and normalizing the various Consul config structures and
services has led to an import cycle.  Break this by creating a new package
that is intended to be terminal in the import DAG.
2016-06-10 15:48:36 -04:00
Sean Chittenden
af72200cf4 Distill config.Config.ConsulConfig down to config.Config.Consul
The enclosed struct provides the necessary context
2016-06-10 15:48:36 -04:00
Diptanu Choudhury
9d8f6d0837 Added a test for generation of the server addr 2016-05-24 21:29:13 -07:00
Alex Dadgar
819eaca09e Use codegen for json marshalling: 20% faster, 12% less bytes allocated, 85% less allocations 2016-05-18 09:45:46 -07:00
Diptanu Choudhury
2216944676 Fixed an agent test 2016-05-11 17:26:53 -07:00
Alex Dadgar
88c590dede agent: Configurable heartbeat 2016-03-04 15:44:12 -08:00
Diptanu Choudhury
315882f60a Testing default http port is being set 2016-02-16 17:54:17 -08:00
Diptanu Choudhury
f5b37b5221 Added a test for testing that http addr is set properly 2016-02-16 13:42:48 -08:00
Gregory Man
21879e22e0 Added node_gc_threshold configuration option
Close #333
2015-10-29 15:58:21 +02:00