Commit Graph

3104 Commits

Author SHA1 Message Date
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
Alex Dadgar
ab5ee4be9e remove generated structs 2018-06-01 16:11:28 -07:00
Alex Dadgar
034262d889 fix test message 2018-06-01 15:51:54 -07:00
Alex Dadgar
81e0142768 Disable Exec on non-linux platforms
This PR disables exec on non-linux platforms
2018-06-01 15:48:14 -07:00
Alex Dadgar
97ad9dfc92 bump version/lint/generated files 2018-06-01 15:23:10 -07:00
Preetha Appan
a7668cd4ec Fix tests and move isClient to constructor 2018-06-01 15:59:53 -05:00
Alex Dadgar
462ad9d27c Merge pull request #4350 from hashicorp/b-raw-exec-cgroups
Raw exec can use cgroups to manage PIDs
2018-06-01 17:37:49 +00:00
Alex Dadgar
657dd1e241 wait for result 2018-06-01 10:14:53 -07:00
Alex Dadgar
d83443932f Merge pull request #4277 from hashicorp/f-retry-join-clients
Add go-discover support to Nomad clients
2018-06-01 16:57:40 +00:00
Alex Dadgar
a4e11c8134 Comments 2018-05-31 18:05:03 -07:00
Alex Dadgar
ec95677a4d Add test and docs 2018-05-31 18:05:03 -07:00
Alex Dadgar
207fece24e Use more appropriate name than cgroup 2018-05-31 18:05:03 -07:00
Alex Dadgar
c5d2c7def5 Only use freezer/devices when in the basic cgroup only 2018-05-31 18:05:03 -07:00
Alex Dadgar
1adf3f9047 Use cgroup when possible 2018-05-31 18:05:03 -07:00
Alex Dadgar
0e85d2032d Fix TestDockerDriver_StartNVersions 2018-05-31 17:14:59 -07:00
Alex Dadgar
ca30e0ff6d Remove debug logging 2018-05-31 15:52:42 -07:00
Alex Dadgar
60ef13c521 spelling 2018-05-31 15:29:55 -07:00
Alex Dadgar
4150296b46 Force close stdout/stderr after grace
This commit changes the force closing of the stdout/stderr file
descriptor from closing immediately to being closed after a grace
period. This allows the created process to close its own file and allows
copying of the data.
2018-05-31 15:21:36 -07:00
Alex Dadgar
b5fa7209c4 test build 2018-05-31 12:22:31 -07:00
Alex Dadgar
1b7809319a Log more info for TestExecutor_IsolationAndConstraints 2018-05-31 11:57:44 -07:00
Alex Dadgar
4fb3b9f7b3 Merge pull request #4341 from hashicorp/f-docker-pids
Support Docker Pids Limit
2018-05-31 17:59:29 +00:00
Chelsea Holland Komlo
1a854c444e add server join info to server and client 2018-05-31 10:50:03 -07:00
Alex Dadgar
5902ea433c test pid limit 2018-05-30 12:55:24 -07:00
Chelsea Holland Komlo
9c52175641 Support Docker Pids Limit 2018-05-25 19:54:14 -04:00
Alex Dadgar
52bed806fc cleanup 2018-05-24 16:25:20 -07:00
Alex Dadgar
7ece3a7d77 Force closing of pipe to child process 2018-05-24 16:03:48 -07:00
Chelsea Holland Komlo
6733d768f0 refactor NewTLSConfiguration to pass in verifyIncoming/verifyOutgoing
add missing fields to TLS merge method
2018-05-23 18:35:30 -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
df8f367b98 Merge pull request #4282 from hashicorp/f-rotator
Avoid splitting log line across two files
2018-05-21 17:52:13 +00: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
Nick Ethier
504a9109f9 client/driver: use correct repo address when using docker-credential helper (#4266) 2018-05-15 17:39:48 -04:00
Justen Walker
ba2d9570e8 driver/docker: add test for dockerImageRef 2018-05-14 14:24:03 -04:00
Justen Walker
f4670f6003 driver/docker: fix up TestParseDockerImage 2018-05-14 14:23:48 -04:00
Justen Walker
44923339a8 driver/docker: fix TestDockerDriver_ForcePull_RepoDigest 2018-05-14 14:23:02 -04:00
Nick Ethier
6e86c4e28c client/driver: gaurd authHelper test from running on windows 2018-05-14 13:46:57 -04: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
Alex Dadgar
80ac8c2a37 Add new line test 2018-05-11 10:52:09 -07:00
Alex Dadgar
8aaf074699 Avoid splitting log line across two files
We attempt to avoid splitting a log line between two files by detecting
if we are near the file size limit and scanning for new lines and only
flushing those.

BenchmarkRotator/1KB-8            300000              5613 ns/op
BenchmarkRotator/2KB-8            200000              8384 ns/op
BenchmarkRotator/4KB-8            100000             14604 ns/op
BenchmarkRotator/8KB-8             50000             25002 ns/op
BenchmarkRotator/16KB-8            30000             47572 ns/op
BenchmarkRotator/32KB-8            20000             92080 ns/op
BenchmarkRotator/64KB-8            10000            165883 ns/op
BenchmarkRotator/128KB-8            5000            294405 ns/op
BenchmarkRotator/256KB-8            2000            572374 ns/op
2018-05-10 15:11:01 -07:00
Alex Dadgar
99182736e8 Benchmark for rotator
BenchmarkRotator/1KB-8            200000              5572 ns/op
BenchmarkRotator/2KB-8            200000              8338 ns/op
BenchmarkRotator/4KB-8            100000             14246 ns/op
BenchmarkRotator/8KB-8             50000             25279 ns/op
BenchmarkRotator/16KB-8            30000             48602 ns/op
BenchmarkRotator/32KB-8            20000             92159 ns/op
BenchmarkRotator/64KB-8            10000            154766 ns/op
BenchmarkRotator/128KB-8            5000            296872 ns/op
BenchmarkRotator/256KB-8            3000            551793 ns/op
2018-05-10 14:15:15 -07: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
46c557c08e client/driver: add test for docker auth helper 2018-05-09 22:33:56 -04:00
Alex Dadgar
9966194730 naming of constants 2018-05-09 16:46:52 -07:00
Chelsea Holland Komlo
0f46208cc1 allow configurable cipher suites
disallow 3DES and RC4 ciphers

add documentation for tls_cipher_suites
2018-05-09 17:15:31 -04:00
Alex Dadgar
51440e24a7 Keep stream and logs in sync for detecting closed pipe 2018-05-09 11:22:52 -07:00