Commit Graph

2149 Commits

Author SHA1 Message Date
Alex Dadgar
50fafa2808 Fix lint errors 2017-03-02 21:03:05 -08:00
Alex Dadgar
fbfeecb486 Fix TestAllocRunner_SaveRestoreState 2017-03-02 20:45:46 -08:00
Alex Dadgar
94974152fd Mkdir -> MkdirAll to avoid error when folder already exists 2017-03-02 19:35:31 -08:00
Alex Dadgar
833b4bd4dc Merge branch 'master' into b-remount 2017-03-02 19:23:13 -08:00
Michael Schurter
16fb45e4ba Fix tests broken by API change 2017-03-02 15:54:12 -08:00
Michael Schurter
6535aa8d95 Fix API breaks in tests 2017-03-02 15:50:18 -08:00
Michael Schurter
866600e980 Cleanup comments/names 2017-03-02 15:44:52 -08:00
Michael Schurter
ad4559d019 Safely ensure {dev,proc,alloc} are mounted
If they're unmounted by a reboot they'll be properly remounted.
2017-03-02 13:21:34 -08:00
Michael Schurter
94ce9d2146 unlinkDir should not error if already unlinked 2017-03-02 13:20:47 -08:00
Michael Schurter
ba87cb8a7f Fix typos 2017-03-02 13:20:05 -08:00
Michael Schurter
255240d1b8 Merge pull request #2391 from hashicorp/b-idempotent-umount
Make sure unmounting the secrets dir is idempotent
2017-03-02 11:24:01 -08:00
Michael Schurter
b584fbd001 Make sure unmounting the secrets dir is idemptoent 2017-03-01 17:19:39 -08:00
Alex Dadgar
dea5a83ef7 Merge pull request #2389 from tmichaud314/2388-docker-driver-auth-file
Fixes docker-driver docker.auth.config processing
2017-03-01 15:39:35 -08:00
Tom Michaud
6e561c7aa9 Fixes docker-driver docker.auth.config processing 2017-03-01 16:16:11 -07:00
Alex Dadgar
2a683cddea Update go-getter and add support for git and hg
Fixes https://github.com/hashicorp/nomad/issues/2042
2017-03-01 14:46:04 -08:00
Dave Walker (Daviey)
5d484dcb96 Enable kernel.version on Windows
Previously, this value was guarded against running on Windows
because it called the `uname` command which is unlikely to
be there.

This change now sets the value from gopsutil, which might
well be an empty string.

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2017-03-01 18:48:23 +00:00
Dave Walker (Daviey)
5875bc1066 Don't exec uname for node attribute kernel.version
Previously with client fingerprinting, sys/exec's Command
function was being used to execute `uname -r` and the return
string processed into the kernel.version node attribute.

This change uses gopsutil/host KernelVersion function
instead.  This means we can drop the os/exec, strings and
fmt imports... and not execute an external binary.

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2017-03-01 09:45:56 +00:00
Alex Dadgar
8e6d77ebd5 Fix caching of pull future 2017-02-28 18:19:13 -08:00
Alex Dadgar
4826d8464e Fix two issues during client restore state
This PR fixes two issues:

1) A close of a nil stopCollection channel when restoring and prestart
fails. The failure will cause the killCh to be triggered which will
close collection before it has been initialized.

2) Fixes a deadlock in which the handleWaitCh is never triggered since
it is not initialized when there is an error in prestart and the killCh
is triggered.

Both fixes are by maintaining the loop invariant that the two channels
are valid after there is a handle.
2017-02-28 10:29:12 -08:00
Alex Dadgar
90cd50b597 Delete on increment and add a safety guard 2017-02-27 20:23:21 -08:00
Alex Dadgar
b2a7daed9d Merge branch 'master' of github.com:hashicorp/nomad 2017-02-27 19:09:50 -08:00
Alex Dadgar
14074d8ff7 Fix delete future 2017-02-27 19:09:13 -08:00
Alex Dadgar
07f7e19578 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
7b73e786cb Docker open stores image/image ID for next ID 2017-02-27 13:49:54 -08:00
Alex Dadgar
b6991b3357 Allow random UUID 2017-02-27 13:42:37 -08:00
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