Commit Graph

2312 Commits

Author SHA1 Message Date
Alex Dadgar
d4d2d1f656 small cleanup 2017-05-31 15:56:54 -07:00
Alex Dadgar
e9f6769f74 Merge branch 'master' into feature/2334 2017-05-31 14:27:07 -07:00
Alex Dadgar
633ec0c39c Merge pull request #2681 from hashicorp/b-deadlock
Fix a deadlock relating to blocked allocations
2017-05-31 14:26:54 -07:00
Alex Dadgar
5bdceb4a65 Merge pull request #2672 from eyberg/master
dont throw away errors in log rotation
2017-05-31 14:14:22 -07:00
Alex Dadgar
b5fbb1f4cf Fix deadlock 2017-05-31 14:05:47 -07:00
Michael Schurter
2aaf149e10 Cleanup lots of leaked alloc runners in tests 2017-05-31 11:39:50 -07:00
Ulrik Mikaelsson
20fd19d6e2 Implement support for docker-credential-helpers
Solves: #2334
2017-05-31 12:45:02 +02:00
Michael Schurter
236ef21489 Merge pull request #2636 from hashicorp/f-gc-alloc-limit
Add new gc_max_allocs tuneable
2017-05-30 16:14:09 -07:00
Michael Schurter
aac319cd16 Merge pull request #2654 from hashicorp/f-env-consul
Add envconsul-like support and refactor environment handling
2017-05-30 14:40:14 -07:00
Michael Schurter
361db24627 Fix Error -> Errorf 2017-05-30 12:08:59 -07:00
Michael Schurter
68db2aa814 Fix getter tests
And use an interface for ReplaceEnv since its all getter needs.
2017-05-26 16:52:47 -07:00
Michael Schurter
aa0e977f1c Fix executor tests 2017-05-26 16:46:03 -07:00
Michael Schurter
c4aa3c38cc Always use PATH-only env for rkt commands 2017-05-26 15:41:26 -07:00
Michael Schurter
fc5254d4b1 Use custom TaskEnv to provide PATH for rkt 2017-05-26 15:24:14 -07:00
Michael Schurter
9ccb53d561 Let's pretend I never committed this 2017-05-26 15:06:59 -07:00
Michael Schurter
be959a4e63 Fix and test multi-env-template loading 2017-05-25 17:13:33 -07:00
Alex Dadgar
44db7509ad Merge pull request #2675 from hashicorp/b-perms
Fix perms to just set exec bit
2017-05-25 14:45:08 -07:00
Alex Dadgar
f3218378cd Fix perms to just set exec bit 2017-05-25 14:44:13 -07:00
Ian Eyberg
0d76cd24bb dont throw away errors in log rotation 2017-05-25 11:49:33 -07:00
Michael Schurter
572ca97967 Fix formatting 2017-05-25 09:38:49 -07:00
Michael Schurter
8f2ea2f9e5 Comment and correct formatting 2017-05-25 09:30:58 -07:00
Michael Schurter
6571fa548d Switch tests to mock_driver 2017-05-25 09:28:10 -07:00
Michael Schurter
0288582e11 Fail fast on env template failures 2017-05-24 13:44:52 -07:00
Michael Schurter
9c6695219b Add env file test 2017-05-23 17:07:25 -07:00
Michael Schurter
d7eccc1288 Add env testing 2017-05-23 16:46:29 -07:00
Michael Schurter
118892453b Shrink chroot to avoid timing test failure 2017-05-23 16:11:24 -07:00
Michael Schurter
72a24aecb0 Add env.Builder.UpdateTask for alloc updates 2017-05-23 16:00:57 -07:00
Michael Schurter
59b3ccaa8b Fix test data 2017-05-23 13:53:34 -07:00
Michael Schurter
1295f88d03 Handle Driver.Prestart returning nil, nil 2017-05-23 13:53:34 -07:00
Michael Schurter
a96fb5dbb0 Move task env into execcontext
Also inject PATH into rkt commands since we're no longer appending host
env vars for it.
2017-05-23 13:53:34 -07:00
Michael Schurter
3743d34203 Fix env var interpolation and env tests 2017-05-23 13:53:34 -07:00
Michael Schurter
6db35013d2 Add PortMap to struct returned by Driver.Prestart
Moves env.Builder out of drivers entirely so one less thing to worry
about when implementing driver plugins.
2017-05-23 13:53:34 -07:00
Michael Schurter
37c1cbc9cf Move env template handling into consul_template.go 2017-05-23 13:53:34 -07:00
Michael Schurter
96753dcbcb Improve PortMap handling and simplify Builder creation 2017-05-23 13:53:34 -07:00
Michael Schurter
3b24980680 Move path building to task dir initialization 2017-05-23 13:53:34 -07:00
Michael Schurter
ace00980a1 Refactor TaskEnvironment into Builder and TaskEnv 2017-05-23 13:53:33 -07:00
Michael Schurter
7dac668adf Functional consul template env file support 2017-05-23 13:45:14 -07:00
Brandon Fulljames
dc95acdcc6 Fix for test 2017-05-19 16:59:07 -07:00
Brandon Fulljames
b0304477a2 Add SecurityOpt as a config field in Docker driver 2017-05-19 16:18:49 -07:00
Alex Dadgar
42801072ff Merge branch 'master' of github.com:hashicorp/nomad 2017-05-17 14:46:03 -07:00
Alex Dadgar
aa15ad51d1 Fix nil job on allocation
The way the copying was happening on the alloc_runner was by temporarily
setting the alloc.Job to nil, copying and then restoring it. This
created an issue in which when the alloc was shared (which it is in
server/client mode and between alloc_runner/task_runner) there were race
conditions that could create a panic.

Fixes https://github.com/hashicorp/nomad/issues/2605
2017-05-17 14:07:06 -04:00
Michael Schurter
70fdc46abc Merge pull request #2591 from hashicorp/b-2180-script-updates
Properly interpolate services on updated tasks
2017-05-17 09:09:01 -07:00
Michael Schurter
fb72f20bb1 gc_max_allocs should include blocked & migrating 2017-05-12 16:03:22 -07:00
Michael Schurter
e3c1d35111 Lower default gc_max_allocs to 50 2017-05-12 15:57:27 -07:00
Michael Schurter
cc11d9a563 Add new gc_max_allocs tuneable
More than gc_max_allocs may be running on a node, but terminal allocs
will be garbage collected to try to keep the total number below the
limit.
2017-05-11 17:18:02 -07:00
Alex Dadgar
7fb1b37e09 Fix vet errors 2017-05-11 13:08:08 -07:00
Alex Dadgar
d11ca57705 Merge pull request #2610 from hashicorp/f-bolt-db
Client persist state using bolt-db and more efficient write patterns
2017-05-09 13:01:36 -07:00
Alex Dadgar
997390b04c Fix test 2017-05-09 11:35:48 -07:00
Michael Schurter
92b19c441a Ignore Consul deregister errors on executors
Errors here only occur if Consul is not running when Nomad is restarted.

Errors here are only an issue if:
 * Consul is being used but is down or misbehaving
 * The executor is old (<0.6)
 * The task has services
 * The services hit a pre-0.6 consul.Syncer bug

If all of those conditions are met the pre-0.6 bugs will persist for
this task until Nomad is restarted.
2017-05-09 11:28:27 -07:00
Alex Dadgar
e47be9f771 Merge branch 'master' into f-bolt-db 2017-05-09 11:11:55 -07:00