Commit Graph

8 Commits

Author SHA1 Message Date
Michael Schurter 83f9591d75 Thanks go vet! 2017-04-19 13:05:41 -07:00
Michael Schurter 4db840b54e Metricsify new Consul client 2017-04-19 12:42:48 -07:00
Michael Schurter 59c687c940 Always fail script checks when deadline exceeded 2017-04-19 12:42:48 -07:00
Michael Schurter 2728216f6f Plumb alloc id + task name into script check logs 2017-04-19 12:42:47 -07:00
Michael Schurter 8c433cfba1 Add comments, clarify names, fix PR comments 2017-04-19 12:42:47 -07:00
Michael Schurter 745ad9521f Move ScriptExecutor to driver 2017-04-19 12:42:47 -07:00
Michael Schurter 87b28cfb75 Switch ServiceClient to synchronizing state
Previously it applied a stream of operations. Reconciling state is less
complex and error prone at the cost of slightly higher CPU/memory usage.
2017-04-19 12:42:47 -07:00
Michael Schurter e204a287ed 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