Commit Graph

110 Commits

Author SHA1 Message Date
Alex Dadgar
e9d8a6aa72 Revendor docker client 2017-02-14 17:34:05 -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
Michael Schurter
a17c3a9ded Updated CreatedResources as images are cleaned 2017-01-17 16:13:40 -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
1ec5c930a6 Return errors from cleanup and let TaskRunner retry 2017-01-12 17:21:54 -08:00
Michael Schurter
33c015bcc7 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
d4b8fc953a using new ctx instead of getting both params back 2017-01-10 16:54:01 -06:00
Cameron Davison
e2a09752b5 add force_pull to docker driver 2017-01-10 16:54:01 -06:00
Michael Schurter
59c501f474 Driver is now required in test tasks 2017-01-06 11:39:17 -08:00
Michael Schurter
e25274b775 Put a logger in AllocDir/TaskDir 2017-01-05 16:31:56 -08:00
Michael Schurter
e7f6986eb2 Test tasks now require driver name 2017-01-05 16:31:55 -08:00
Michael Schurter
de7351b959 Move chroot building into TaskRunner
* Refactor AllocDir to have a TaskDir struct per task.
* Drivers expose filesystem isolation preference
* Fix lxc mounting of `secrets/`
2017-01-05 16:31:49 -08:00
Michael Schurter
fccf115c56 Merge pull request #2054 from hashicorp/f-prestart
Add Driver.Prestart method
2016-12-20 16:18:56 -08:00
Michael Schurter
decee19978 Fix tests broken by TaskEnv change 2016-12-20 14:37:35 -08:00
Michael Schurter
ee17940dfe Add Driver.Prestart method
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.

Currently Prestart does two things:

* Any driver specific task environment building
* Download Docker images

This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Dmitry Galinsky
49416ebf4c Add network_aliases for docker driver 2016-11-16 11:16:07 +03:00
Alex Dadgar
0aad09c239 Remove todo 2016-11-10 15:20:19 -08:00
Alex Dadgar
e246167dc5 Changes the relative path from joining against the alloc dir to the
task's directory.

This PR changes the behavior when given a relative host path when
mounting docker containers. Prior to this, the behavior was to mount by
joining against the alloc/ directory. This PR changes it to be against
the task/ directory.
2016-11-10 14:47:54 -08:00
Alex Dadgar
f3bd7a8a69 Add docker test 2016-10-28 17:53:25 -07:00
Alex Dadgar
8864f6f9a5 Don't delete docker images in test 2016-10-27 12:31:53 -07:00
Michael Schurter
98debf5320 Expand env vars in docker volume paths
Fixes #1876
2016-10-27 11:02:38 -07:00
Michael Schurter
fe7179c8ee Allow mounting alloc-dir-relative paths in docker 2016-10-25 09:46:49 -07:00
Michael Schurter
89a1b60c1b Enable rkt and docker volume mounting by default 2016-10-25 09:46:49 -07:00
Alex Dadgar
ceecfbbdef Merge pull request #1845 from hashicorp/f-remove-disk-usage-acct
Remove disk usage enforcement
2016-10-22 19:01:51 -07:00
Alex Dadgar
109deabf3a Fix signal test for docker 2016-10-22 18:32:48 -07:00
Michael Schurter
4d3187bc7e Remove disk usage enforcement
Many thanks to @iverberk for the original PR (#1609), but we ended up
not wanting to ship this implementation with 0.5.

We'll come back to it after 0.5 and hopefully find a way to leverage
filesystem accounting and quotas, so we can skip the expensive polling.
2016-10-21 13:55:51 -07:00
Alex Dadgar
1a3585b572 Docker + Qemu 2016-10-10 11:47:04 -07:00
Michael Schurter
fe1e3c792f Put docker volume support behind conf flag
Also add tests and fix bug with logging driver configuration.
2016-10-03 15:02:50 -07:00
Alex Dadgar
4bae54741e Secret dir materialized in alloc/task directory 2016-09-02 12:44:05 -07:00
Alex Dadgar
0546ca65aa Fix TestDockerDriver_Fingerprint 2016-08-23 10:39:40 -07:00
Diptanu Choudhury
584f31ddf6 re-using copyimage 2016-08-17 15:25:03 -07:00
Diptanu Choudhury
a446f416fd Fixed docker tests 2016-08-17 15:25:03 -07:00
Diptanu Choudhury
f0bab506f1 Updated the busybox images 2016-08-12 11:39:58 -07:00
Alex Dadgar
3d7876f229 Update test.sh 2016-08-11 21:35:50 -07:00
Diptanu Choudhury
e6aabd1af6 Fixed docker tests 2016-08-11 19:28:41 -07:00
Diptanu Choudhury
a4fa10cd10 Merge pull request #1413 from hashicorp/b-tests
Fix flaky tests
2016-08-11 18:15:29 -07:00
Mathias Lafeldt
27d787e76c Test configuration of Docker working directory 2016-08-03 16:35:49 +02:00
Alex Dadgar
963ab06bff tests wait for the container to start 2016-07-12 11:36:06 -06:00
Alex Dadgar
662aa531ce Docker host network test 2016-07-12 10:59:34 -06:00
Diptanu Choudhury
3dbea05f57 Fixed tests 2016-07-08 18:27:51 -07:00
Alex Dadgar
fb81caa1bb unify cli output 2016-06-12 13:16:07 -07:00
Alex Dadgar
127fbfb243 skip docker test if no docker found 2016-06-12 11:28:43 -07:00
Diptanu Choudhury
c760d5910f Renamed error message in alloc endpoint 2016-05-28 20:03:52 -07:00
Diptanu Choudhury
993675dd4e Added a test for docker 2016-05-28 19:59:20 -07:00
Diptanu Choudhury
8e63a6a602 Fixed docker test 2016-05-22 02:49:33 -07:00
Sean Chittenden
22aecf1402 Revert making UniversalExecutor.wait() platform specific 2016-05-08 11:21:34 -07:00
Sean Chittenden
92bad38729 Catch up with error message drift in docker 2016-05-07 15:46:44 -07:00
Diptanu Choudhury
3c973fd7cf Modified the test to wait for 3 seconds before inspecting containers 2016-04-14 06:43:37 +05:30
Diptanu Choudhury
d71a070e32 Added a test to ensure that the docker driver is removing containers after container exits successfully 2016-04-12 01:00:14 -04:00
Diptanu Choudhury
8760643621 Making the load a list of strings and added website docs 2016-03-30 17:23:29 -07:00