Michael Schurter
caf317e3f2
Use a DriverAbility to expose Exec functionality
2017-04-19 12:42:47 -07:00
Michael Schurter
e204a287ed
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
cdd624ff5b
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
d71ddcb756
Allow specifying container IP with docker driver
2017-04-07 11:56:07 -04:00
Michael Schurter
ae3810052d
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
507862ade3
Add WrapRecoverable helper
2017-03-27 15:37:15 -07:00
Alex Dadgar
4ecebe7d8c
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
0e6c564406
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
d220d9405b
return the recoverable err
2017-03-14 16:33:36 -07:00
Alex Dadgar
5f7bf577cd
Docker doesn't need to init the stats helper
2017-03-14 13:41:57 -07:00
Tom Michaud
b4db9d33f9
Fixes docker-driver docker.auth.config processing
2017-03-01 16:16:11 -07:00
Alex Dadgar
d2193048ce
Fix caching of pull future
2017-02-28 18:19:13 -08:00
Alex Dadgar
5be806a3df
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
c423626484
Docker open stores image/image ID for next ID
2017-02-27 13:49:54 -08:00
Alex Dadgar
aa05ecc37c
Merge pull request #2361 from hashicorp/f-docker-coordination
...
Docker Image Coordinator and caching
2017-02-24 14:18:21 -08:00
Alex Dadgar
b5d4f39734
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
f61b7975a3
Put access to Docker volume drivers behind flag
2017-02-23 15:47:36 -08:00
Pietro Menna
2f88d6cb68
Docker Volume Drivers
...
This commit adds the functionality to use Docker Volume Drivers.
2017-02-23 14:36:32 -03:00
Michael Schurter
12c549d6a0
Skip setting MemorySwap on Windows
...
Windows doesn't support this Docker setting.
Fixes #2193
2017-02-21 13:21:42 -08:00
Alex Dadgar
f9323f03df
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
fda3a5250c
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
dfd1f03ec8
Added a comment
2017-01-23 14:57:30 -08:00
Alex Dadgar
e160b2b38f
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
43a17b7d74
Close file
2017-01-23 11:37:45 -08:00
Alex Dadgar
ee5296ba70
Deprecation notice
2017-01-23 11:32:51 -08:00
Alex Dadgar
3365688571
Remove SSL
2017-01-23 11:32:51 -08:00
Alex Dadgar
4a627b02ca
undo
2017-01-23 11:32:51 -08:00
Alex Dadgar
08733b68d2
vendor
2017-01-23 11:32:51 -08:00
Alex Dadgar
b1823a5fdb
Better auth lookup
2017-01-23 11:32:51 -08:00
Alex Dadgar
3d5b31fc96
WIP
2017-01-23 11:32:51 -08:00
Alex Dadgar
ec6b6e69d4
remove reference to entrypoint
2017-01-22 14:04:41 -08:00
Michael Schurter
295c2bf74a
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
be7081568c
Making the docker driver retry when an image is not found
2017-01-20 12:38:04 -08:00
Michael Schurter
010a7709f1
Bump unknown resource to ERR
2017-01-19 09:48:07 -08:00
Michael Schurter
578272b7f2
Add CreatedResources.Remove and use it
2017-01-17 16:41:59 -08:00
Michael Schurter
1bcf7cdbfe
Remove outdated comment
2017-01-17 16:23:29 -08:00
Michael Schurter
82b49d4547
Updated CreatedResources as images are cleaned
2017-01-17 16:13:40 -08:00
Michael Schurter
beed31ff6f
Remove outdated comment
2017-01-17 16:05:21 -08:00
Michael Schurter
b9d6d2c8d6
Return error from Prestart
2017-01-17 16:04:09 -08:00
Michael Schurter
255698e8af
Use Image ID instead of Image Name
2017-01-13 16:53:58 -08:00
Michael Schurter
a3a3656dbb
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
25bf266606
Add ID to output
2017-01-13 12:46:55 -08:00
Michael Schurter
dc68aa1a5a
Return errors from cleanup and let TaskRunner retry
2017-01-12 17:21:54 -08:00
Diptanu Choudhury
6809a4b104
Added executorconfig
2017-01-12 15:47:58 -08:00
Diptanu Choudhury
b1d0078db5
Filter executor log messages
2017-01-12 11:54:19 -08:00
Michael Schurter
ec81325ddc
Stop being so confusing
2017-01-12 11:17:35 -08:00
Michael Schurter
4d081490e6
Add Cleanup method to Driver interface
...
Cleanup can be used for cleaning up resources created by drivers to run
a task. Initially the Docker driver is the only user (to remove
downloaded images).
2017-01-11 17:23:33 -08:00
Cameron Davison
7ccbd8a000
fixing typo in comment
2017-01-10 16:54:01 -06:00
Cameron Davison
88a462d5b9
add force_pull to docker driver
2017-01-10 16:54:01 -06:00
Michael Schurter
65fb580216
Fix inconsistent task env setting
...
Consolidate task environment building in GetTaskEnv since it can
determine what kind of filesystem isolation is used.
This means drivers no longer have to manipulate task environment paths.
2017-01-06 12:19:32 -08:00