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
Michael Schurter
84fed29a37
Merge pull request #2572 from hashicorp/docs-2571-cli-tls
...
Mention required cli config when using tls
2017-04-18 09:40:43 -07:00
Michael Schurter
b54c248feb
Mention required cli config when using tls
...
Fixes #2571
2017-04-18 09:04:06 -07:00
Alex Dadgar
8ad95182a0
Document fix
2017-04-17 20:53:15 -07:00
Alex Dadgar
f8828a5a50
Fix some tests
2017-04-17 19:39:20 -07:00
Michael Schurter
17471bf7c0
Set ownership on directories in chroot
...
Also support getOwner on all Unixes as they all have `Stat_t.{U,G}id`
2017-04-17 12:41:33 -07:00
Michael Schurter
1cffc7310e
Don't disable hardlinking!
2017-04-17 11:03:15 -07:00
Michael Schurter
2fe3de16be
Chown files when copying into chroot
...
Fixes #2552
Not needed when hardlinking. Only adds Linux support but other OS's may
be easy.
2017-04-17 11:03:15 -07:00
Alex Dadgar
000f42a427
API Docs
2017-04-16 16:58:48 -07:00
Alex Dadgar
ea15f4b05e
Diff code fixes
2017-04-16 16:54:40 -07:00
Alex Dadgar
376e177836
Status shows type of job
2017-04-15 17:08:05 -07:00
Alex Dadgar
5e1e7afc62
GC and some fixes
2017-04-15 17:08:05 -07:00
Alex Dadgar
950171f094
non-purge deregisters
2017-04-15 17:08:05 -07:00
Alex Dadgar
330800f683
Agent API + api package
2017-04-15 17:08:05 -07:00
Alex Dadgar
b9a8137485
GetJobVersions server endpoint
2017-04-15 17:08:05 -07:00
Alex Dadgar
5c618ab56e
Histories -> Versions
2017-04-15 17:08:05 -07:00
Alex Dadgar
0c94d4822b
Upsert Job Histories
2017-04-15 17:08:05 -07:00
Alex Dadgar
4b244219f9
Job History schema
2017-04-15 17:08:05 -07:00
Alex Dadgar
0e25ef9509
changelog
2017-04-14 15:30:31 -07:00
Alex Dadgar
477c97ee8f
Merge pull request #2555 from hashicorp/f-nack-delay
...
Back-pressure on Nacks and ensure scheduling progress on failures
2017-04-14 15:27:54 -07:00