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
edbc84087c
Add Leader support to client
2017-02-10 17:55:19 -08:00
Michael Schurter
9bfa8dc2bd
Add COMPAT comment
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
3011df1c89
Fix upgrade path for #2132
...
AllocRunner's state dropped the Context struct which needs to be
converted to the new AllocDir+TaskDir structs in RestoreState.
TaskRunner added a TaskDirBuilt flag, but it's safe to just let that
default to `false` and rebuild all task dirs once on upgrade.
2017-01-05 16:31:55 -08:00
Michael Schurter
d87dcce722
Fail fast on taskdir errors
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
Bastiaan Bakker
bd0ab77a0b
use snap.Alloc.TaskStates only after confirming snap.Alloc is not nil
2016-11-07 22:35:00 +01:00
Alex Dadgar
ad8b5bc141
Task state "dead" is terminal
2016-11-04 16:57:24 -07:00
Alex Dadgar
51831f92dd
Merge pull request #1840 from hashicorp/f-kill-fail
...
Change how we mark tasks as failed and allow consul-template to fail tasks
2016-10-24 13:40:52 -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
f130c8a894
Change how we mark tasks as failed and allow consul-template to fail tasks
2016-10-20 17:27:16 -07:00
Alex Dadgar
e34902ae8a
Large refactor of task runner and Vault token rehandling
2016-10-18 11:24:20 -07:00
Diptanu Choudhury
c29861b418
Getting snapshot of allocation from remote node ( #1741 )
...
* Added the alloc dir move
* Moving allocdirs when starting allocations
* Added the migrate flag to ephemeral disk
* Stopping migration if the allocation doesn't need migration any more
* Added the GetAllocDir method
* refactored code
* Added a test for alloc runner
* Incorporated review comments
2016-10-03 09:59:57 -07:00
Alex Dadgar
d49dda45e3
Merge pull request #1713 from hashicorp/f-alloc-runner-vault
...
Vault integration in client
2016-09-20 16:15:55 -07:00
Alex Dadgar
5c3acf1b78
Fix comment
2016-09-17 11:31:17 -07:00
Alex Dadgar
038991b5e3
Handle recovery failure
2016-09-15 12:50:44 -07:00
Alex Dadgar
5532e911cb
Fix token renewal
2016-09-15 11:20:51 -07:00
Alex Dadgar
c89fd0eb08
Clean up vault client
2016-09-14 18:10:56 -07:00
Alex Dadgar
bec6adb2ee
Vault token threaded
2016-09-14 13:30:01 -07:00
Michael Schurter
78a4befa71
Revert "A nil context isn't an error"
...
This reverts commit fe9fe4c262 .
2016-09-12 12:56:12 -07:00
Michael Schurter
fe9fe4c262
A nil context isn't an error
2016-09-02 16:24:53 -07:00
Michael Schurter
8cb85ed120
Don't serialize task states twice in state files
2016-09-02 16:07:06 -07:00
Michael Schurter
8d9468d4c3
Lock around saving state
...
Prevent interleaving state syncs as it could conceivably lead to
empty state files as per #1367
2016-09-02 16:07:06 -07:00
Michael Schurter
6f2b09f676
Add sanity check to SaveState
...
Also just reuse the task states snapshot taken by `Alloc()` instead of
doing a redundant copy.
2016-09-02 16:07:06 -07:00
Alex Dadgar
335cababe1
Revert "Introduce a Secret/ directory"
2016-09-01 17:23:15 -07:00
Alex Dadgar
0b07ef93c1
Address comments and reserve
2016-08-31 18:11:02 -07:00
Alex Dadgar
46ce8dd020
Interface + tests
2016-08-30 21:40:32 -07:00
Alex Dadgar
0ebdff2bb7
Secret dir, hello world
2016-08-29 15:41:52 -07:00
Ivo Verberk
13071e9846
Disk resource monitoring and enforcement
2016-08-18 07:59:03 +02:00
Diptanu Choudhury
724a2a2111
Fixed some error messages
2016-08-10 15:17:32 -07:00
Kenjiro Nakayama
a02267ac75
Update after review
2016-08-09 08:57:26 +09:00
Kenjiro Nakayama
59c05eb64b
tiny: Return fmt.Errorf instead of duplicated error messages
2016-08-09 08:57:26 +09:00
Alex Dadgar
6da051503c
Retrieve task runners in helper
2016-07-21 13:41:01 -07:00
Alex Dadgar
144f277226
finer grain locking
2016-06-20 10:19:06 -07:00
Alex Dadgar
80edb57a6f
Guard against bad restore
2016-06-17 14:58:53 -07:00
Alex Dadgar
020f8b05d3
only support latest and remove ring buffer
2016-06-12 09:32:38 -07:00
Alex Dadgar
1a7df4e7d2
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Diptanu Choudhury
c99733e8c7
Fixed the compilation on linux
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
31af4e0ac4
Changed signature of Allocation Stats Reporter
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
2b1f3896cc
Acquiring locks before iterating allocations and tasks
2016-05-28 19:59:20 -07:00
Diptanu Choudhury
7d8196d7ea
Added some documentation
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
f390261cd0
Reporting time series of stats
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
01e0ae7753
Added a client API to display resource usage of an allocation
2016-05-28 19:42:34 -07:00
Sean Chittenden
29be52f762
Speling police
2016-05-15 09:41:34 -07:00
Alex Dadgar
ff6028bd56
Test task failure killing TG and fix setting the task as received on a restore
2016-03-25 12:51:40 -07:00
Alex Dadgar
73419c2691
kill tasks in alloc when one fails
2016-03-25 12:50:25 -07:00
Alex Dadgar
77f5c6eab0
Merge pull request #975 from hashicorp/f-rename-complete-alloc
...
Successful allocations are marked as complete instead of dead
2016-03-25 10:35:11 -07:00
Alex Dadgar
e0699c2abb
Successful allocations are marked as complete instead of dead
2016-03-23 18:08:19 -07:00
Diptanu Choudhury
9a71225b9e
Removing references to old consul services and adding consul config to executor context
2016-03-23 12:19:19 -07:00