Alex Dadgar
4f6f6a13c8
Emit generic task events
2017-08-07 21:26:04 -07:00
Alex Dadgar
79d25b7db9
Merge pull request #2947 from hashicorp/f-vault-grace
...
Allow template to set Vault grace
2017-08-07 16:29:53 -07:00
Alex Dadgar
93b9a1bf20
Rename runnerConfig
2017-08-07 16:29:42 -07:00
Michael Schurter
c76b3b54b9
Merge branch 'master' into fix-pending-state
2017-08-03 17:27:03 -07:00
Alex Dadgar
067a638478
Allow template to set Vault grace
...
This PR allows a template to specify the Vault grace duration.
Fixes https://github.com/hashicorp/nomad/issues/2922
2017-08-01 14:14:08 -07:00
Alex Dadgar
562ea52c8e
vendor vault api
2017-08-01 09:30:55 -07:00
Michael Schurter
6243c9eb86
Merge pull request #2883 from kmalec/add-support-for-readonly-mount
...
rkt driver support for read-only volumes mounts
2017-07-31 10:58:22 -07:00
Alex Dadgar
010567dba8
Fix leaked plugin files for syslog server
...
This PR fixes a leaking of the unix socket used when launching a syslog
server for the Docker driver.
Fixes https://github.com/hashicorp/nomad/issues/2844
2017-07-30 17:51:38 -07:00
Alex Dadgar
a9c786a4fe
Make test Vault pick random ports
2017-07-25 17:40:59 -07:00
Michael Schurter
b01dd31f26
Don't attempt to restore tasks that never sync'd
2017-07-24 15:58:46 -07:00
Alex Dadgar
031da7a21c
fix vet
2017-07-22 22:43:33 -07:00
Alex Dadgar
0f3f1ea68b
travis check fixes
2017-07-22 21:01:22 -07:00
Alex Dadgar
c1a72d24e6
fingerprinters
2017-07-22 20:38:03 -07:00
Alex Dadgar
62c55c8fc9
fix slow resolve on mac
2017-07-22 19:58:30 -07:00
Alex Dadgar
72d055aa9c
drop rkt deadline
2017-07-22 19:54:06 -07:00
Alex Dadgar
219fecc705
Merge branch 'master' of github.com:hashicorp/nomad
2017-07-22 19:48:54 -07:00
Alex Dadgar
d760e68774
darwin test fixes
2017-07-22 19:48:47 -07:00
Alex Dadgar
553bc91725
Parallel client tests ( #2890 )
...
* alloc_runner
* Random tests
* parallel task_runner and no exec compatible check
* Parallel client
* Fail fast and use random ports
* Fix docker port mapping
* Make concurrent pull less timing dependant
* up parallel
* Fixes
* don't build chroots in parallel on travis
* Reduce parallelism on travis with lxc/rkt
* make java test app not run forever
* drop parallelism a little
* use docker ports that are out of the os's ephemeral port range
* Limit even more on travis
* rkt deadline
2017-07-22 19:04:36 -07:00
Alex Dadgar
b6f0782732
typo
2017-07-22 12:55:30 -07:00
Alex Dadgar
8cf9d15b01
typo
2017-07-22 12:33:07 -07:00
Alex Dadgar
9e9c20ca77
small fixes
2017-07-22 12:25:02 -07:00
Alex Dadgar
5a3df2ed89
Merge pull request #2888 from hashicorp/b-fix-allocrunner-test
...
Fix TestAllocRunner_TaskLeader_StopTG and unrelated races
2017-07-22 11:44:04 -07:00
Alex Dadgar
46c8bec9b0
faster vaultclient
2017-07-21 19:38:37 -07:00
Michael Schurter
d840fc8c95
Fix tr race by not sharing alloc/task
...
prestart only needs the original alloc/task so pass their pointers in.
Task updates may concurrently replace the pointer on tr.
2017-07-21 16:17:42 -07:00
Michael Schurter
a22cfa8387
Minor test race fix
2017-07-21 16:17:23 -07:00
Michael Schurter
9a7a1d8c13
Fix race by not accessing tr.task from ar
2017-07-21 16:16:53 -07:00
Michael Schurter
2e9a1e3fa6
Remove unneeded saveTaskRunnerState method
...
Collapse it into the one place it's called
2017-07-21 16:16:02 -07:00
Michael Schurter
996ce9286e
Fix test race by locking around ar.tasks access
2017-07-21 14:25:51 -07:00
Michael Schurter
8d1d8eac46
Fix handle race
2017-07-21 14:00:32 -07:00
Michael Schurter
5f40901422
Fix more test races
2017-07-21 14:00:21 -07:00
Michael Schurter
b9ba447399
Fixup a few more even rarer test races
2017-07-21 13:43:32 -07:00
Michael Schurter
38cb2021dd
Always interpolate task before calling with Consul
...
Also switch to returning a copy of the task to avoid races between
altering the Task and persitence.
2017-07-21 13:37:16 -07:00
Michael Schurter
6e80a8ee39
Fix TestAllocRunner_TaskLeader_StopTG
...
Also make alloc runner tests less racy. Basically every alloc runner
test used to have races with `upd.{Count,Allocs}`
2017-07-21 13:37:16 -07:00
Alex Dadgar
e509661cf9
executor and logging pkg
2017-07-21 12:14:54 -07:00
Alex Dadgar
7c433a1767
Parallel
2017-07-21 12:06:39 -07:00
Karel Malec
4b98f94a88
Allow rkt driver to mount volumes read-only
2017-07-21 13:05:15 +02:00
Alex Dadgar
56f9cf86df
Speed up client startup
2017-07-20 22:34:24 -07:00
Michael Schurter
0d7f7e2b9d
Merge pull request #2878 from hashicorp/b-save-state
...
Fix state handling on restart
2017-07-20 17:16:46 -07:00
Karel Malec
cf985f011c
Pass task group name as NOMAD_GROUP_NAME environment variable
2017-07-21 01:22:54 +02:00
Alex Dadgar
09c8ee621b
Destroy tasks that are part of terminal alloc
2017-07-20 12:02:04 -07:00
Michael Schurter
9a7f649e56
Don't save task runner state if it is destroyed
2017-07-20 10:17:41 -07:00
Alex Dadgar
64776b1370
Should not persist state after alloc_runner is garbage collected
2017-07-19 17:31:30 -07:00
Michael Schurter
c1b8bef813
Use broadcast send retry logic everywhere
2017-07-18 14:36:32 -07:00
Alex Dadgar
d2381c9263
Merge pull request #2853 from hashicorp/b-watcher
...
Improve alloc health watcher
2017-07-18 14:12:28 -07:00
Alex Dadgar
bd43bd509c
Save deployment status
2017-07-18 12:37:52 -07:00
Alex Dadgar
41f67e3535
Small fixes
2017-07-18 12:19:57 -07:00
Michael Schurter
c24e73ede7
Fix deadlock caused by syncing during destroy
...
When replacing an alloc the new alloc is blocked until the old alloc is
destroyed. This could cause a deadlock:
1. Destroying the old alloc includes a final sync of its status
2. Syncing status causes a GC
3. A GC looks for terminal allocs to cleanup
4. The GC waits for an alloc to stop completely before GC'ing
If the GC chooses the currently-being-destroyed-alloc to GC, the GC
deadlocks. If `client.max_parallel` deadlocks happen the GC is wedged
until the Nomad process is restarted.
Performing the final sync asynchronously is an ugly hack but prevents
the deadlock by allowing the final sync to occur after the alloc runner
has shutdown and been destroyed.
2017-07-18 11:12:56 -07:00
Michael Schurter
420be86e39
Test AllocDir.Copy
2017-07-17 15:46:54 -07:00
Michael Schurter
cdb2e96d99
Add AllocRunner.allocID for ease-of-use
...
Since the AllocRunner.alloc struct can be mutated, most of AllocRunner
needs to acquire a lock to get the alloc's ID. Log lines always need to
include the alloc ID, so we often skipped acquiring a lock just to grab
the ID and accepted the race.
Let's make the race detector a little happier by storing the ID in a
single assignment field.
2017-07-17 15:46:54 -07:00
Michael Schurter
181fda825a
Fix log level
2017-07-17 15:46:54 -07:00