Commit Graph

1157 Commits

Author SHA1 Message Date
Alex Dadgar
e9f6769f74 Merge branch 'master' into feature/2334 2017-05-31 14:27:07 -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
Ulrik Mikaelsson
20fd19d6e2 Implement support for docker-credential-helpers
Solves: #2334
2017-05-31 12:45:02 +02: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
Ian Eyberg
0d76cd24bb dont throw away errors in log rotation 2017-05-25 11:49:33 -07:00
Michael Schurter
d7eccc1288 Add env testing 2017-05-23 16:46:29 -07:00
Michael Schurter
72a24aecb0 Add env.Builder.UpdateTask for alloc updates 2017-05-23 16:00:57 -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
96753dcbcb Improve PortMap handling and simplify Builder creation 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
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
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
Michael Schurter
499ada5a64 Merge pull request #2585 from hashicorp/b-2554-container-exec
Execute exec/java script checks in containers
2017-05-05 10:31:18 -07:00
Michael Schurter
426c696404 Reuse ExecScript implementation 2017-05-04 16:21:40 -07:00
Alex Dadgar
3642434293 Fix tests 2017-05-03 15:14:19 -07:00
Kate Taggart
82d60ce670 fix test. 2017-05-03 12:45:59 -07:00
Kate Taggart
6ea156b565 responding to feedback on PR: remove Region from Node struct, some grammatical niceties. 2017-05-03 12:45:59 -07:00
Kate Taggart
4a4417d556 I think I did it. 2017-05-03 12:45:59 -07:00
Kate Taggart
530cf03177 allow region to also be interpolated, like datacenter. 2017-05-03 12:45:59 -07:00
Kate Taggart
d10bfb46c1 just found out dc and region are going to be a bit different, as Region didn't previously exist in the Node struct. 2017-05-03 12:45:59 -07:00
Kate Taggart
a5c4663efb add helper functions to set and clear dc, region names. 2017-05-03 12:45:59 -07:00
Kate Taggart
aeec7b3591 add dc and region to task env building function. flipped order of a couple functions to be consistent with the ordering of the rest of that section. 2017-05-03 12:45:59 -07:00
Kate Taggart
cf1b298f72 starting the jelly bean trail for two new env vars 2017-05-03 12:45:59 -07:00
Alex Dadgar
7614feddbd boltDB database for client state 2017-05-01 14:50:34 -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
fb3b30bba9 Fix Windows build. 2017-04-19 13:16:48 -07:00
Michael Schurter
db8aabe1c3 Fix circular test imports 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
63a8307255 Move ScriptExecutor to driver 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
Alex Dadgar
8d07bd8f9c Add ExtraHosts to Docker driver
This PR allows job submitters to add extra hosts to the containers
/etc/hosts file.

Fixes https://github.com/hashicorp/nomad/issues/2546
2017-04-11 10:52:41 -07:00
Clint Armstrong
5f4716b4ea Allow specifying container IP with docker driver 2017-04-07 11:56:07 -04:00
Alex Dadgar
1dbd63ad2a Split driver tests 2017-04-04 15:12:14 -07:00
Robert Neumayer
46dcbc5c5e Fix typo and be consistent in naming 2017-03-29 09:33:54 +02:00
Michael Schurter
4d3c571859 Merge pull request #2482 from hashicorp/f-2289-better-artifact-err
Improve artifact download error message
2017-03-28 12:48:22 -07:00
Michael Schurter
ae9d49502a Recoverable struct field must be exported 2017-03-28 12:18:57 -07:00
Michael Schurter
7f2bbe70c1 Merge branch 'master' into b-2491-task-env 2017-03-28 11:28:00 -07:00
Alex Dadgar
d698288f3a Merge pull request #2461 from hashicorp/b-groups
Various fixes for setting user/group of task
2017-03-28 11:13:27 -07:00