Commit Graph

71 Commits

Author SHA1 Message Date
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
789a5072a9 Parallel 2017-07-21 12:06:39 -07:00
Karel Malec
bafe9276ec Pass task group name as NOMAD_GROUP_NAME environment variable 2017-07-21 01:22:54 +02:00
Alex Dadgar
beb01f1754 test fixes 2017-07-07 14:11:27 -07:00
Michael Schurter
a96fb5dbb0 Move task env into execcontext
Also inject PATH into rkt commands since we're no longer appending host
env vars for it.
2017-05-23 13:53:34 -07:00
Alex Dadgar
3642434293 Fix tests 2017-05-03 15:14:19 -07:00
Kate Taggart
82d60ce670 fix test. 2017-05-03 12:45:59 -07:00
Alex Dadgar
564367fa71 Proper reference counting through task restarts
This PR fixes an issue in which the reference count on a Docker image
would become inflated through task restarts.
2017-03-25 17:05:53 -07:00
Michael Schurter
693d89d51c Fix test by adding new env vars 2017-03-14 17:15:12 -07:00
Michael Schurter
6535aa8d95 Fix API breaks in tests 2017-03-02 15:50:18 -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
eaa57878d9 Vendor + test fixes 2017-02-22 15:55:33 -08:00
Alex Dadgar
8a0739613a small env fix 2017-01-25 10:42:11 -08:00
Alex Dadgar
438054775c Fix test 2017-01-23 16:33:35 -08:00
Michael Schurter
ef154fa449 Merge pull request #2215 from hashicorp/b-2211-host-env
Fix image based drivers having host env vars set
2017-01-20 13:16:44 -08:00
Michael Schurter
17bdfaf9e7 Fix image based drivers having host env vars set
Add detailed tests for GetTaskEnv to avoid this issue happening again!

Fixes #2211
2017-01-18 10:27:03 -08:00
Michael Schurter
cf06204c82 Add CreatedResources.Remove and use it 2017-01-17 16:41:59 -08:00
Michael Schurter
33c015bcc7 Add Cleanup method to Driver interface
Cleanup can be used for cleaning up resources created by drivers to run
a task. Initially the Docker driver is the only user (to remove
downloaded images).
2017-01-11 17:23:33 -08:00
Michael Schurter
1bb4806ab4 Fix missing value in test failure message 2017-01-10 13:39:05 -08:00
Michael Schurter
a087a8be79 Fix inconsistent task env setting
Consolidate task environment building in GetTaskEnv since it can
determine what kind of filesystem isolation is used.

This means drivers no longer have to manipulate task environment paths.
2017-01-06 12:19:32 -08:00
Michael Schurter
e25274b775 Put a logger in AllocDir/TaskDir 2017-01-05 16:31:56 -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
Alex Dadgar
248c069652 Merge pull request #2128 from hashicorp/f-dispatch
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Michael Schurter
decee19978 Fix tests broken by TaskEnv change 2016-12-20 14:37:35 -08:00
Alex Dadgar
c2cb2cc11f Fix test and prevent job with payload from being submitted 2016-12-18 16:32:14 -08:00
Michael Schurter
ee17940dfe Add Driver.Prestart method
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.

Currently Prestart does two things:

* Any driver specific task environment building
* Download Docker images

This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08: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
Michael Schurter
2ae0c85290 Add NOMAD_JOB_NAME to environment 2016-10-11 11:20:42 -07:00
Alex Dadgar
b097191ec6 Test fix 2016-09-26 15:35:59 -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
Diptanu Choudhury
e93ff0af02 Fixed a java test 2016-08-23 16:51:09 -05:00
Ivo Verberk
13071e9846 Disk resource monitoring and enforcement 2016-08-18 07:59:03 +02:00
Diptanu Choudhury
938d512f49 Not running tests parallal 2016-08-11 21:53:27 -07:00
Diptanu Choudhury
3dbea05f57 Fixed tests 2016-07-08 18:27:51 -07:00
Alex Dadgar
8cdb590298 Driver tests use client default config 2016-06-17 14:24:49 -07:00
Alex Dadgar
636c3fc82f Add IP and PORT environment variables 2016-04-15 11:01:32 -07:00
Alex Dadgar
be6da2a446 Fix test 2016-03-25 10:26:32 -07:00
Alex Dadgar
4c1be8e637 Get tests to pass 2016-03-15 13:28:57 -07:00
Alex Dadgar
3040c4dab2 Fix test 2016-03-08 11:41:26 -08:00
Alex Dadgar
abcc50ac80 Driver tests 2016-03-01 16:22:33 -08:00
Alex Dadgar
e696c7eef7 Fix timeouts between signal and kill 2016-02-08 19:31:57 -08:00
Ivo Verberk
b9de8704ee Rename IPPort env variable and add a mapped host port to the env. 2016-01-25 20:46:01 +01:00
Ivo Verberk
f71db5e645 Pass a combination of ip and port to the task environment.
The different labels can be on different IPs.
2016-01-24 10:31:03 +01:00
Alex Dadgar
dccbc0320b Fix tests 2016-01-11 09:58:31 -08:00
Alex Dadgar
b8a42786f3 merge 2016-01-11 09:58:26 -08:00
Alex Dadgar
9f44780f89 User specifiable kill timeout and operator configurable max 2015-12-22 16:10:30 -08:00
Chris Hines
ffda9d71d4 Speed up tests by allowing parallel execution. 2015-11-25 15:56:55 -05:00
Chris Hines
d707adc3ed Use package testtask and httptest.Server to make client/driver tests OS independent. 2015-11-25 15:56:20 -05:00