Commit Graph

154 Commits

Author SHA1 Message Date
Michael Schurter
77d9b417c1 Skip https health check if verify_https_client is true 2017-05-03 12:19:02 -07:00
Michael Schurter
a2d453ad14 Fix error check for consul skip tls verify support 2017-05-02 17:38:18 -07:00
Michael Schurter
4cf34edb29 Skip checks with TLSSkipVerify if it's unsupported
Fixes #2218
2017-04-19 12:45:34 -07:00
Michael Schurter
64057d48fe Use go-version instead of manual version parsing 2017-04-19 12:42:48 -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
Michael Schurter
10cb924b2c Refactor Consul Syncer into new ServiceClient
Fixes #2478 #2474 #1995 #2294

The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.

The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.

Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.

Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
2017-04-19 12:42:47 -07:00
Alex Dadgar
36dc330737 Various fixes
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Alex Dadgar
701537e9c5 Limit parallelism during garbage collection
This PR introduces a parallelism limit during garbage collection. This
is used to avoid large resource usage spikes if garbage collecting many
allocations at once.
2017-03-10 16:27:00 -08:00
Alex Dadgar
b6991b3357 Allow random UUID 2017-02-27 13:42:37 -08:00
Alex Dadgar
e2d2911d06 Allow specification of eval/job gc threshold 2017-02-27 11:58:10 -08:00
Alex Dadgar
258ed556ba Vault Client on Server handles SIGHUP
This PR allows the Vault client on the server to handle a SIGHUP. This
allows updating the Vault token and any other configuration without
downtime.
2017-02-01 14:24:10 -08:00
Diptanu Choudhury
6b0a1ebb58 Making the GC related fields tunable 2017-01-31 15:51:20 -08:00
Diptanu Choudhury
49e6735227 Merge pull request #2159 from hashicorp/b-consul-config
Fixed merging consul config
2017-01-18 16:14:54 -08:00
Diptanu Choudhury
6d669fb48e Moved functions to helper from structs 2017-01-18 15:55:14 -08:00
Diptanu Choudhury
84137b02c5 Filter executor log messages 2017-01-12 11:54:19 -08:00
Alex Dadgar
1d7588a1fc Fix TestRetryJoin 2016-11-15 15:28:21 -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
4aed5ba1e2 Restore sync/atomic use for consistency 2016-11-08 16:21:52 -08:00
Michael Schurter
9420e73e7e Match old error messages 2016-11-08 15:25:29 -08:00
Michael Schurter
4e7587de17 Choose safer default advertise address
* -dev mode defaults bind & advertise to localhost
* Normal mode defaults bind to 0.0.0.0 & advertise to the resolved
  hostname. If the hostname resolves to localhost it will refuse to
  start and advertise must be manually set.
2016-11-08 11:17:16 -08:00
Diptanu Choudhury
53a8e45d32 Disable http checks if TLS is enabled 2016-11-03 17:33:58 -07:00
Seth Vargo
c86a07d834 Separate agent configuration into its own pages
I apologize in advance for the rather long PR, but unfortunately there
is not an easy way to break this up into smaller chunks. This separates
the agent configuration into smaller, more consumable pieces just like
the job specification.
2016-11-02 18:30:00 -04:00
Alex Dadgar
f218c8849b Resolve 2016-11-01 13:23:44 -07:00
Alex Dadgar
b8650b24d2 Allow advertise to not specify port 2016-10-31 17:12:29 -07:00
Alex Dadgar
a3676fc097 Small cleanups 2016-10-27 10:51:11 -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
Evan Gilman
801352e0bc Use bind address for consul healtchecks in nomad client too 2016-10-27 10:47:45 -07:00
Evan Gilman
3e2b2fdb86 Use bind address for consul service checks 2016-10-27 10:47:45 -07:00
Diptanu Choudhury
6db8a06f38 Making the nomad agent checks tcp 2016-10-26 16:30:29 -07:00
Diptanu Choudhury
722433b4f9 Making the cli use TLS if the client has enabled TLS 2016-10-26 11:13:53 -07:00
Diptanu Choudhury
ecfb24d521 Moving the TLSConfig to structs 2016-10-25 15:57:38 -07:00
Diptanu Choudhury
15b2cc5d8c Changed the way TLS config is parsed 2016-10-24 13:56:19 -07:00
Diptanu Choudhury
11c1583467 Implemented TLS support for http and rpc 2016-10-23 22:22:00 -07: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
Alex Dadgar
859f4c5d5e Increase the timeout to be greater than the RPC hold threshold 2016-08-26 11:13:20 -07:00
Alex Dadgar
4efecc01ea Pass Vault config to client 2016-08-17 16:23:29 -07:00
Alex Dadgar
be93647df0 Add Vault config to server 2016-08-17 16:23:29 -07:00
Diptanu Choudhury
6811e084f4 Merge pull request #1518 from pubnub/feature/chroot-map-rebase
Add config field to specify chroot mapping for exec driver
2016-08-10 17:00:03 -07:00
Jay Oster
1876fc2b10 Add config field to specify chroot mapping for exec driver
- Same format as used by the internal chroot mapping
- Map: source_path -> dest_path
- Example HCL:

client {
  chroot_env {
    "/etc" = "/etc"
    "/lib" = "/lib"
    "/opt/projects/foo/bin" = "/usr/bin"
  }
}
2016-08-03 17:17:17 -07:00
Diptanu Choudhury
3593649e18 Allow operators to opt into publishing node and alloc metrics 2016-08-01 19:52:20 -07:00
Wim
c576c2339b Use net.JoinHostPort 2016-07-25 23:34:08 +02:00
Wim
b3df64c976 Fix IPv6 advertise addresses 2016-07-25 22:52:18 +02:00
Alex Dadgar
dddf376a04 use microsecond granularity 2016-06-22 15:20:56 -07:00
Alex Dadgar
213f21df45 remove resolving client rpc addr 2016-06-17 14:55:37 -07:00
Sean Chittenden
451c685f1c Provide nomad.Config with a default LogOutput of os.StdErr 2016-06-17 06:44:10 -07:00
Sean Chittenden
bcf0929c95 Pass a logger arg to NewClient and NewServer 2016-06-16 23:29:23 -07:00
Sean Chittenden
d8d78d72f2 Remove the shutdownCh as an argument, it was already present in the receiver 2016-06-16 23:15:41 -07:00