Commit Graph

65 Commits

Author SHA1 Message Date
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
Alex Dadgar
7181c5ac48 fix flaky test 2017-01-23 14:12:38 -08:00
Michael Schurter
8e82326c2f Prevent race between alloc runners
Block ar1's periodic syncing which could recreate the state file ar2 was
destroying.
2017-01-17 13:10:20 -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
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
Michael Schurter
b7083f4842 Bump timeout on test 2016-11-29 16:19:40 -08:00
Diptanu Choudhury
e32a855ca6 Fixed alloc dir move tests 2016-10-26 15:17:57 -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
Ben Barnard
ce94317d00 Replace "the the" with "the" in documentation and comments 2016-10-11 15:31:40 -04: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
cd8784894d Alloc runner tests 2016-09-15 17:24:09 -07:00
Alex Dadgar
038991b5e3 Handle recovery failure 2016-09-15 12:50:44 -07:00
Alex Dadgar
c89fd0eb08 Clean up vault client 2016-09-14 18:10:56 -07:00
Diptanu Choudhury
612a16abc3 Fixing alloc runner tests 2016-09-04 19:09:08 -07:00
Alex Dadgar
335cababe1 Revert "Introduce a Secret/ directory" 2016-09-01 17:23:15 -07:00
Alex Dadgar
46ce8dd020 Interface + tests 2016-08-30 21:40:32 -07:00
Michael Schurter
40e1ffd6ba Merge pull request #1653 from hashicorp/b-fix-artifact-retry
Don't fail other tasks when retrying artifact get
2016-08-26 09:53:39 -07:00
Michael Schurter
5b0dd7ff2b Make sure bad doesn't fail before web runs 2016-08-25 17:25:51 -07:00
Michael Schurter
bbce6c7ad1 Ensure bad task reaches terminal state within test 2016-08-25 16:05:19 -07:00
Michael Schurter
2a88e48f07 Ensure web task exited successfully
Web task should run to completion successfully while the `bad` task is
retrying artifact downloads.
2016-08-25 14:42:50 -07:00
Michael Schurter
d1da2ce020 Don't fail other tasks when retrying artifact get
The artifact fetching may be retried and succeed, so don't set the task
as dead.

Fixes #1558
2016-08-25 13:16:41 -07:00
Ivo Verberk
42afc6b80b Small comment fix. 2016-08-25 20:50:11 +02:00
Ivo Verberk
0d13488f1f Monitor the complete alloc directory, not just the shared part. 2016-08-25 20:48:19 +02:00
Ivo Verberk
a97432107b Don't duplicate TaskKilled event and check for TaskSiblingFailed. 2016-08-25 20:11:10 +02:00
Ivo Verberk
13071e9846 Disk resource monitoring and enforcement 2016-08-18 07:59:03 +02:00
Sean Chittenden
ac174dbb6b Fix building tests that used DefaultConfig() but didn't pickup the package move. 2016-06-10 15:50:11 -04: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
Alex Dadgar
6b3c22e91a Batch client allocation updates to the server 2016-02-21 21:15:02 -08:00
Alex Dadgar
1a31340075 Unmount special directories when task finishes 2016-02-08 18:51:11 -08:00
Alex Dadgar
fb010e2c5d Small fixes 2016-02-04 14:19:27 -08:00
Alex Dadgar
c89e97084d Fix AllocRunner not capturing destroy signal and tests 2016-02-04 13:09:53 -08:00
Alex Dadgar
cc90670210 Fix tests 2016-02-03 19:58:39 -08:00
Alex Dadgar
de6e1e791e Another test fix 2016-02-02 17:35:06 -08:00
Alex Dadgar
a2132950a5 Restart on-success shouldn't be user specifiable 2016-02-02 17:35:06 -08:00
Alex Dadgar
410ae593e7 Fix double pull with introduction of AllocModifyIndex 2016-02-01 15:43:59 -08:00
Alex Dadgar
2158e05fa9 Just check the alloc is not pending 2016-01-21 16:05:35 -08:00
Alex Dadgar
6953ae4b79 AllocRunner restore test 2016-01-21 14:52:41 -08:00
Alex Dadgar
e91abac0f6 Fix a bunch of tests
Up timeouts

trusty travis beta

Increase timeouts
2016-01-20 16:03:53 -08:00
Diptanu Choudhury
568006247d Making a struct to hold consul service config 2015-12-11 14:06:51 -08:00
Diptanu Choudhury
6af01d2d6f Muted the consul debug messages 2015-12-11 09:06:03 -08:00
Diptanu Choudhury
eaea4f6800 Fixed the alloc runner test 2015-11-25 14:54:52 -08:00