Commit Graph

2124 Commits

Author SHA1 Message Date
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
Alex Dadgar
18107556ab Fix noisy log 2017-02-23 14:40:24 -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
Alex Dadgar
8723d3a6e5 Merge pull request #2344 from hashicorp/b-fix-allocdir-move-test
Fix allocdir Move test and make code more defensive
2017-02-22 18:43:10 -08:00
Alex Dadgar
c89d8247e6 Merge pull request #2302 from hashicorp/f-task-state-setup
Adding a task event for setup
2017-02-22 18:42:57 -08:00
Alex Dadgar
85a59d3852 Merge pull request #2347 from hashicorp/b-parse
Remove defaulting from parse and fix tests
2017-02-22 18:42:43 -08:00
Alex Dadgar
7447ccd7e4 Fix tests and docs 2017-02-22 18:28:07 -08:00
Diptanu Choudhury
c80bdd9f5f Adding a task event for setup 2017-02-22 18:28:07 -08:00
Alex Dadgar
eaa57878d9 Vendor + test fixes 2017-02-22 15:55:33 -08:00
Michael Schurter
da3e34710c Fix allocdir Move test and make code more defensive
A change in the behavior of `os.Rename` in Go 1.8 brought to light a
difference in the logic between `{Alloc,Task}Runner` and this test:

AllocRunner builds the alloc dir, moves dirs if necessary, and then lets
TaskRunner call TaskDir.Build().

This test called `TaskDir.Build` *before* `AllocDir.Move`, so in Go 1.8
it failed to `os.Rename over` the empty {data,local} dirs.

I updated the test to behave like the real code, but I defensively added
`os.Remove` calls as a subtle change in call order shouldn't break this
code. `os.Remove` won't remove a non-empty directory, so it's still
safe.
2017-02-21 17:22:10 -08: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
bfd34bb1e8 Don't force uppercase meta keys in env vars 2017-02-20 19:51:24 -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
Alex Dadgar
ee76b78922 rebase 2017-02-20 16:43:28 -08:00
Alex Dadgar
da0c005e7b Merge pull request #2318 from hashicorp/f-vault-debug
Server side Vault telemetry
2017-02-17 11:34:37 -08:00
Alex Dadgar
6effacbf12 Docs 2017-02-17 10:16:15 -08:00
Alex Dadgar
dca06bd1f5 Add allocated/unallocated metrics to client 2017-02-16 18:28:11 -08:00
Alex Dadgar
e9d8a6aa72 Revendor docker client 2017-02-14 17:34:05 -08:00
Alex Dadgar
22b64a53cf Better derive token logging 2017-02-14 16:46:54 -08:00
Alex Dadgar
edbc84087c Add Leader support to client 2017-02-10 17:55:19 -08:00
Michael Schurter
c6e78e2939 Fix test to assert new never-nil behavior 2017-02-10 10:11:15 -08:00
Michael Schurter
a760fbcea6 Use getters & setters with nil guards 2017-02-09 17:44:58 -08:00
Michael Schurter
c961e751ec Fix upgrade path for created resources
This *might* be a fix for #2295 -- I've been unable to reproduce the
bug. However, this guard seems wise regardless. I should never be
overwriting an intialized created resources with a nil.
2017-02-09 13:54:33 -08:00
Alex Dadgar
4f84eec2bb Merge pull request #2293 from hashicorp/f-vendor-memdb
Vendor MemDB
2017-02-08 14:51:01 -08:00
Alex Dadgar
43ab32f96c Tests compile 2017-02-07 21:30:57 -08:00
Sean Chittenden
c3c44d27fc Unconditionally lowercase the node ID read from disk. 2017-02-06 16:20:17 -08:00
Sean Chittenden
31333eecae Add better verification of a host's HostID. 2017-02-02 16:24:32 -08:00
Alex Dadgar
df2c9ccbe5 Merge pull request #2277 from hashicorp/f-durable-uuid
Reproducible Node ID
2017-02-02 11:54:49 -08:00
Alex Dadgar
15a349debd Merge pull request #2262 from hashicorp/f-permissions
Template destination file permissions.
2017-02-02 11:28:44 -08:00
Sean Chittenden
e4df8042e3 Slight mis-merge: secret-id in dev mode is random and needs to be returned. 2017-02-01 22:20:52 -08:00
Sean Chittenden
6c194a47c2 Generate a durable NodeID if possible, otherwise fall back to a random HostID. 2017-02-01 22:11:33 -08:00
Alex Dadgar
fea5509242 Merge branch 'master' into f-permissions 2017-02-01 16:57:46 -08:00
Alex Dadgar
4bf2401844 Merge branch 'master' into b-vault-race 2017-02-01 16:57:26 -08:00
Alex Dadgar
9e822a2e8f Fix race condition with Deriving vault tokens
This PR fixes a race condition in which the client was not locked while
deriving Vault tokens. This allowed the token to be set which would
cause subsequent Vault requests to fail with permission denied because
the incorrect Vault token was being used.

Further this PR makes the unsetting and unlocking of the client atomic
to avoid an even harder to hit race condition (not sure it was ever hit
but was still incorrect).
2017-02-01 16:25:59 -08:00
Diptanu Choudhury
754b40070c Checking in updated gc tests 2017-02-01 13:12:46 -08:00
Alex Dadgar
9afa48310e Template destination file permissions.
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
Diptanu Choudhury
6b0a1ebb58 Making the GC related fields tunable 2017-01-31 15:51:20 -08:00
Michael Schurter
2822dd760c Handle createdResourcs=nil
Combined with b522c472fd this fixes #2256

Without these two commits in place upgrades to 0.5.3 panics.
2017-01-31 10:51:32 -08:00
Alex Dadgar
b522c472fd Add nil guard 2017-01-31 09:19:59 -08:00
Alex Dadgar
8e5d2dd817 slightly more verbose test 2017-01-30 16:16:26 -08:00
Alex Dadgar
3c7e018438 up timing 2017-01-26 13:25:37 -08:00
Alex Dadgar
314435261d Rename dispatch_input to dispatch_payload 2017-01-25 21:27:44 -08:00
Alex Dadgar
0e8b43767b Fix import 2017-01-25 21:27:36 -08:00
Alex Dadgar
c920d3cbb0 Fix unreachable function in tests 2017-01-25 20:58:24 -08:00
Alex Dadgar
2c48e93963 More timing fixes 2017-01-25 11:57:38 -08:00
Alex Dadgar
8a0739613a small env fix 2017-01-25 10:42:11 -08:00
Alex Dadgar
db446bbabf Fix flaky test 2017-01-24 09:40:13 -08:00
Alex Dadgar
938b04e99a Fix fsm/env test 2017-01-24 09:36:22 -08:00