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
ace00980a1
Refactor TaskEnvironment into Builder and TaskEnv
2017-05-23 13:53:33 -07:00
Brandon Fulljames
b0304477a2
Add SecurityOpt as a config field in Docker driver
2017-05-19 16:18:49 -07:00
johannesa
bdfd0b4810
Fixed wrong newline
2017-05-17 16:51:22 +02:00
johannesa
b523069441
mac address pinning in docker driver
...
This commit adds mac address pining to the docker driver.
2017-05-17 16:41:00 +02:00
Michael Schurter
0e0845e94b
Use a DriverAbility to expose Exec functionality
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
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
76c909bc9e
Add WrapRecoverable helper
2017-03-27 15:37:15 -07:00
Alex Dadgar
564367fa71
Proper reference counting through task restarts
...
This PR fixes an issue in which the reference count on a Docker image
would become inflated through task restarts.
2017-03-25 17:05:53 -07:00
Michael Schurter
774cb8dd9b
Improve artifact download error message
...
Fixes #2289
Unfortunately took more RecoverableError hijinx than I would have liked.
There might be a better way.
2017-03-24 15:26:05 -07:00
Alex Dadgar
0e61a36564
return the recoverable err
2017-03-14 16:33:36 -07:00
Alex Dadgar
a6067d5667
Docker doesn't need to init the stats helper
2017-03-14 13:41:57 -07:00
Tom Michaud
6e561c7aa9
Fixes docker-driver docker.auth.config processing
2017-03-01 16:16:11 -07:00
Alex Dadgar
8e6d77ebd5
Fix caching of pull future
2017-02-28 18:19:13 -08:00
Alex Dadgar
07f7e19578
Fix vet script and fix vet problems
...
This PR fixes our vet script and fixes all the missed vet changes.
It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar
7b73e786cb
Docker open stores image/image ID for next ID
2017-02-27 13:49:54 -08:00
Alex Dadgar
5338dafd51
Merge pull request #2361 from hashicorp/f-docker-coordination
...
Docker Image Coordinator and caching
2017-02-24 14:18:21 -08:00
Alex Dadgar
27b2c677c0
Docker Image Coordinator
...
This PR introduces a coordinator for doing CRUD on a Docker image. It
should fix racy deletion of images. The issue before was images would be
deleted between prestart and start causing an error.
2017-02-24 13:20:40 -08:00
Michael Schurter
d710c23d4d
Put access to Docker volume drivers behind flag
2017-02-23 15:47:36 -08:00
Pietro Menna
5d29600341
Docker Volume Drivers
...
This commit adds the functionality to use Docker Volume Drivers.
2017-02-23 14:36:32 -03:00
Michael Schurter
8c35388677
Skip setting MemorySwap on Windows
...
Windows doesn't support this Docker setting.
Fixes #2193
2017-02-21 13:21:42 -08:00
Alex Dadgar
4ba4987625
Drivers log during fingerprinting
...
This PR fixes a regression in which some drivers did not log during
fingerprinting.
2017-02-20 19:35:51 -08:00
Diptanu Choudhury
b52aa931a3
Merge pull request #2222 from hashicorp/b-docker-image-not-found
...
Making the docker driver retry when an image is not found
2017-01-23 14:58:00 -08:00
Diptanu Choudhury
5992a2a88a
Added a comment
2017-01-23 14:57:30 -08:00
Alex Dadgar
77b19f55a0
Add test and better logs
...
This commit adds a test to retrieving auth configurations, use either
the auth block in the config or specified via the agent config and adds
a log if lookup fails.
2017-01-23 14:48:02 -08:00
Alex Dadgar
67bec60f1b
Close file
2017-01-23 11:37:45 -08:00
Alex Dadgar
abd06938e5
Deprecation notice
2017-01-23 11:32:51 -08:00
Alex Dadgar
3c610ec864
Remove SSL
2017-01-23 11:32:51 -08:00
Alex Dadgar
982feb8d6b
undo
2017-01-23 11:32:51 -08:00
Alex Dadgar
36725370ee
vendor
2017-01-23 11:32:51 -08:00
Alex Dadgar
03f9bba1e4
Better auth lookup
2017-01-23 11:32:51 -08:00
Alex Dadgar
6342d4fedf
WIP
2017-01-23 11:32:51 -08:00
Alex Dadgar
71679ccef4
remove reference to entrypoint
2017-01-22 14:04:41 -08:00
Michael Schurter
269b3c7e14
Merge pull request #2186 from hashicorp/f-driver-cleanup
...
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -08:00
Diptanu Choudhury
e659ee0b77
Making the docker driver retry when an image is not found
2017-01-20 12:38:04 -08:00
Michael Schurter
c2ec30c47b
Bump unknown resource to ERR
2017-01-19 09:48:07 -08:00
Michael Schurter
cf06204c82
Add CreatedResources.Remove and use it
2017-01-17 16:41:59 -08:00
Michael Schurter
9c012a71e0
Remove outdated comment
2017-01-17 16:23:29 -08:00
Michael Schurter
a17c3a9ded
Updated CreatedResources as images are cleaned
2017-01-17 16:13:40 -08:00
Michael Schurter
17d9e8e189
Remove outdated comment
2017-01-17 16:05:21 -08:00
Michael Schurter
4dcba012f4
Return error from Prestart
2017-01-17 16:04:09 -08:00
Michael Schurter
1f35e97510
Use Image ID instead of Image Name
2017-01-13 16:53:58 -08:00
Michael Schurter
db096b23b5
Switch to use recoverable errors from Cleanup
...
TaskRunner handles retrying but Cleanup handles all of CreatedResources.
2017-01-13 16:46:08 -08:00
Michael Schurter
b82c69886d
Add ID to output
2017-01-13 12:46:55 -08:00
Michael Schurter
1ec5c930a6
Return errors from cleanup and let TaskRunner retry
2017-01-12 17:21:54 -08:00
Diptanu Choudhury
a066d90313
Added executorconfig
2017-01-12 15:47:58 -08:00
Diptanu Choudhury
84137b02c5
Filter executor log messages
2017-01-12 11:54:19 -08:00