Commit Graph

492 Commits

Author SHA1 Message Date
Alex Dadgar
383251f53b Fix kill timeout exceeding 5m on Docker driver
Fixes an issue where the Docker API client would timeout before the kill
timeout was hit.
2018-08-17 16:01:09 -07:00
Alex Dadgar
33298ab14e Merge pull request #4535 from hashicorp/f-keep-docker-container-0.8.4
Option to prevent removal of container on exit
2018-07-26 11:11:22 -07:00
Charlie Voiselle
61bec1e212 Option to prevent removal of container on exit 2018-07-26 11:10:48 -07:00
Daniele Valeriani
f47ac0d430 Validate the value of cpu_cfs_period 2018-07-02 22:30:22 +02:00
Daniele Valeriani
f94e1c3d2e Remove an unnecessary conversion 2018-07-02 17:47:23 +02:00
Daniele Valeriani
dd7699abdb Add support for specifying cpu_cfs_period in the Docker driver 2018-07-02 16:37:04 +02:00
Alex Dadgar
b7a7cafec0 Merge pull request #4185 from jesusvazquez/add-counter-metric-for-oom-killer-events
Add driver.docker counter metric for OOM Killer events
2018-06-04 15:12:51 -07:00
Chelsea Holland Komlo
9c52175641 Support Docker Pids Limit 2018-05-25 19:54:14 -04:00
Preetha
0fcfaab646 Merge pull request #4303 from hashicorp/b-docker-client-nil-panic
Add nil check before setting timeout on docker client
2018-05-21 19:34:44 -07:00
Jesus Vazquez
ae0b3d9ffa Add job, task, taskgroup to open method 2018-05-21 20:37:18 +02:00
Jesus Vazquez
48c5093bd2 Remove allocID from dockerhandle struct 2018-05-21 20:33:01 +02:00
Jesus Vazquez
a5166e9676 Rename labels job, task_group and task 2018-05-21 20:32:50 +02:00
Jesus Vazquez
caeb596e05 Remove allocid label from driver.docker.oom counter metric 2018-05-21 20:30:56 +02:00
Alex Dadgar
d7fd033959 Merge pull request #4298 from justenwalker/docker-driver-digest-tags
driver/docker: pull image with digest
2018-05-21 17:46:14 +00:00
Justen Walker
ce63b79449 driver/docker: cleanup parseDockerImage 2018-05-14 11:11:51 -04:00
Justen Walker
e77d8a59eb driver/docker: pull image with digest
GH #4290

Add digest support to the docker driver image config. This commit
factors out some common code to print the repo:tag (dockerImageRef) for
events/logs as well as parsing the image to retreive the repo,tag
(parseDockerImage) so that the results are consistent/sane for both
repo:tag and repo@sha256:... references.

When pulling an image with a digest, the tag is blank and the repo
contains the digest. See:
https://github.com/fsouza/go-dockerclient/blob/master/image_test.go#L471
2018-05-14 10:42:58 -04:00
Preetha Appan
ead6d88aba Add nil check before setting timeout on docker client 2018-05-11 17:09:26 -05:00
Nick Ethier
d3c138e310 client/driver: parse repo instead of attempting to pull repo info 2018-05-09 22:34:25 -04:00
Nick Ethier
bbb3d74744 client/driver: use correct repo address when using docker-credential helper 2018-05-08 15:17:28 -04:00
Nick Ethier
9ea3080343 client/driver: remove pull timeout due to race condition that can lead to unexpected timeouts
If two jobs are pulling the same image simultaneously, which ever starts the pull first will set the pull timeout.
This can lead to a poor UX where the first job requested a short timeout while the second job requested a longer timeout
causing the pull to potentially timeout much sooner than expected by the second job.
2018-05-07 12:18:11 -04:00
Nick Ethier
6fb6ecdff6 client/driver: do accounting on layer pull progress 2018-05-07 12:17:53 -04:00
Nick Ethier
c44db4ce79 client/driver: emit progress to all allocs pulling same image 2018-05-07 12:17:34 -04:00
Nick Ethier
77d57e8276 client/driver: add image pull progress monitoring 2018-05-07 12:17:38 -04:00
Jesus Vazquez
e7bd558fe9 Update counter driver.docker.oom labels 2018-05-04 14:02:34 +08:00
Jesus Vazquez
8bc4eb261d Initialize dockerhandle with jobname, taskgroupname, taskname and allocid 2018-05-04 14:02:19 +08:00
Jesus Vazquez
feeee1b037 Add Job, taskgroupname, taskname, and allocid to the DockerHandle struct 2018-05-04 14:01:26 +08:00
Jesus Vazquez
54e178851b Run goimports 2018-05-04 13:46:36 +08:00
Jesus Vazquez
5cacfaf7a1 Add driver.docker counter metric for OOM Killer events 2018-05-04 13:46:36 +08:00
Chelsea Holland Komlo
c6cd78db59 only initialize docker clients if they are nil 2018-04-09 14:13:07 -04:00
Chelsea Holland Komlo
4c1c88a91c refacotoring simplification from code review 2018-04-09 10:34:17 -04:00
Chelsea Holland Komlo
d251199432 group similar functions; update comments
health check timeout should be 1 minute
2018-04-05 16:19:02 -04:00
Chelsea Holland Komlo
dee4fc4555 remove do once block when creating a new docker client
only set cached connections upon no error
2018-04-05 16:19:02 -04:00
Chelsea Holland Komlo
45d09d1ef9 use client with shorter timeouts for health checks 2018-04-05 16:19:02 -04:00
Chelsea Holland Komlo
9092439107 refactor docker clients method to be able to extend to creating new clients 2018-04-05 16:19:02 -04:00
Alex Dadgar
95a7e1a90a Driver Info output 2018-03-22 17:18:32 -07:00
Alex Dadgar
b59bea98b0 Docker driver doesn't return errors but injects into the DriverInfo 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
06a306e460 improve comments; update watchDriver 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
240fee4848 fix up codereview feedback 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
9dfb5c6b46 go style; update comments 2018-03-21 15:15:25 -04:00
Chelsea Holland Komlo
9ec5a93bc1 fix scheduler driver name; create node structs file 2018-03-21 15:15:25 -04:00
Chelsea Holland Komlo
1570972cb3 add concept of health checks to fingerprinters and nodes
fix up feedback from code review

add driver info for all drivers to node
2018-03-21 15:15:25 -04:00
Michael Schurter
b096fd7539 docker: make volume errors recoverable
The interface+mock just to test this one little error handling may seem
like overkill but there was just no other way to write an automated test
around this logic as there's no way to simluate this error with stock
Docker.
2018-03-15 17:52:43 -07:00
Michael Schurter
8da7335c16 non-Existent -> nonexistent
Reverting from #3963

https://www.merriam-webster.com/dictionary/existent
2018-03-12 11:59:33 -07:00
Josh Soref
9655acf79a spelling: inspect 2018-03-11 18:15:27 +00:00
Josh Soref
ac40c42533 spelling: existent 2018-03-11 18:30:37 +00:00
Josh Soref
84d6c92937 spelling: documentation 2018-03-11 17:55:21 +00:00
Jainin Shah
9752e08322 adding comments to the change 2018-02-28 16:19:51 -08:00
Jainin Shah
a64fd0c47c changing the formula to correctly pass the CPUQota to docker 2018-02-27 12:32:23 -08:00
Michael Schurter
c7c4564f1d Merge pull request #3825 from jaininshah9/master
add a flag for cpu_hard_limit
2018-02-08 20:40:38 -08:00
Michael Schurter
bc1894fb8e Merge branch 'master' into f-cpu_hard_limit 2018-02-08 20:14:29 -08:00