Michael Schurter
2cc492c95e
Test pre-0.6 script check upgrade path
2017-04-25 11:41:03 -07:00
Michael Schurter
8f518c4c1f
Test env+cgroups for exec driver checks
2017-04-25 11:13:06 -07:00
Michael Schurter
29f222d461
Change raw_exec to use simplified exec wrapper
2017-04-21 16:50:20 -07:00
Michael Schurter
90f5e232a5
Switch java/exec to use Exec in Executor
2017-04-21 16:25:49 -07:00
Michael Schurter
ba1c2e7936
Upgrade go-version to one compatible with Nomad versioning
2017-04-21 16:25:49 -07:00
Michael Schurter
fe2b3e382d
Restart tasks on upgrade with script checks and old executors
2017-04-21 16:25:49 -07:00
Michael Schurter
58430bf062
Fix consul test build on Windows
2017-04-19 16:14:11 -07:00
Michael Schurter
fb3b30bba9
Fix Windows build.
2017-04-19 13:16:48 -07:00
Michael Schurter
b9ea2765ec
Thanks go vet!
2017-04-19 13:05:41 -07:00
Michael Schurter
a5dcf6bbd9
Document tls_skip_verify
2017-04-19 12:45:34 -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
7c67166510
Add TLSSkipVerify support to api and parser
2017-04-19 12:45:34 -07:00
Michael Schurter
86bc2fbf9c
Fix diff test + bonus upgrade to subtests
2017-04-19 12:42:48 -07:00
Michael Schurter
64057d48fe
Use go-version instead of manual version parsing
2017-04-19 12:42:48 -07:00
Michael Schurter
6d9e61bb51
Use spiffy new Go 1.8 subtest feature
2017-04-19 12:42:48 -07:00
Michael Schurter
5948daf4f7
Forgot an important word
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
8e0c97e52f
Unregister from Consul when waiting for restart
2017-04-19 12:42:48 -07:00
Michael Schurter
f0bec63174
Explain weird timer logic
2017-04-19 12:42:48 -07:00
Michael Schurter
de3d78365e
Metricsify new Consul client
2017-04-19 12:42:48 -07:00
Michael Schurter
d3f3af8bf9
Always fail script checks when deadline exceeded
2017-04-19 12:42:48 -07:00
Michael Schurter
465cc5157b
Test script check exit codes
2017-04-19 12:42:47 -07:00
Michael Schurter
6a56b0efc6
Follow _testing.go convention for testing tools
2017-04-19 12:42:47 -07:00
Michael Schurter
927b265854
Rework to account for ports not being in IDs
...
Previous implementation assumed all struct fields were included in
service and check IDs. Service IDs never include port labels and check
IDs *optionally* include port labels, so lots of things had to change.
Added a really big test to exercise this.
2017-04-19 12:42:47 -07:00
Michael Schurter
7de3adaf87
Remove commits return value
...
...and still protect against leaking agent entries in Consul on
shutdown.
2017-04-19 12:42:47 -07:00
Michael Schurter
4f224132ad
Remove stale comment
2017-04-19 12:42:47 -07:00
Michael Schurter
db8aabe1c3
Fix circular test imports
2017-04-19 12:42:47 -07:00
Michael Schurter
6bb7d8b736
Backoff on Consul lookup failures
2017-04-19 12:42:47 -07:00
Michael Schurter
5d75efc397
Explain PortLabel handling in RegisterAgent
2017-04-19 12:42:47 -07:00
Michael Schurter
48269c36b0
Plumb alloc id + task name into script check logs
2017-04-19 12:42:47 -07:00
Michael Schurter
80617a9c1a
Stop being lazy and just type out struct{}{}
2017-04-19 12:42:47 -07:00
Michael Schurter
7ac9215fb7
Use nifty testtask sleep command for xplat compat
2017-04-19 12:42:47 -07:00
Michael Schurter
0e0845e94b
Use a DriverAbility to expose Exec functionality
2017-04-19 12:42:47 -07:00
Michael Schurter
4002d87a6b
Add comments, clarify names, fix PR comments
2017-04-19 12:42:47 -07:00
Michael Schurter
b4c7d92936
Explain cleanup defer in test
2017-04-19 12:42:47 -07:00
Michael Schurter
fd69d48244
Move removal from Consul into TaskRunner cleanup
2017-04-19 12:42:47 -07:00
Michael Schurter
a3fc76b63a
Fix comment to reflect reality
2017-04-19 12:42:47 -07:00
Michael Schurter
63a8307255
Move ScriptExecutor to driver
2017-04-19 12:42:47 -07:00
Michael Schurter
b4e40efa15
Fix shutdown when consul is down
2017-04-19 12:42:47 -07:00
Michael Schurter
80882f3e0e
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
b6937912d8
Add UpdateTask method instead of Remove/Add
2017-04-19 12:42:47 -07:00
Michael Schurter
7930d35925
Remove some lies
2017-04-19 12:42:47 -07:00
Michael Schurter
e13b149628
Remove unused syncInterval
2017-04-19 12:42:47 -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
Michael Schurter
55965cbfa8
Merge pull request #2553 from hashicorp/b-2552-chown-on-copy
...
Chown files when copying into chroot
2017-04-19 12:38:26 -07:00
Michael Schurter
75c3863533
Add #2552 / #2553 to changelog
2017-04-19 12:37:15 -07:00
Alex Dadgar
3a20e7c1e6
changelog
2017-04-19 11:12:17 -07:00
Alex Dadgar
e281c97624
Merge pull request #2566 from hashicorp/f-job-versions
...
Track multiple job versions and introduce a stop state for jobs
2017-04-19 11:11:11 -07:00
Alex Dadgar
019bb3ae58
Respond to review comments
2017-04-19 10:54:03 -07:00
Seth Vargo
c6fede8bde
Fix logos
2017-04-18 14:15:06 -04:00