Commit Graph

75 Commits

Author SHA1 Message Date
Chelsea Holland Komlo
ba2ebbc7f9 code review fixup 2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo
a9447addd3 add applicable boolean to fingerprint response
public fields and remove getter functions
2018-01-31 13:21:45 -05:00
Chelsea Holland Komlo
f5fc20a564 create safe getters and setters for fingerprint response 2018-01-26 11:22:05 -05:00
Chelsea Holland Komlo
5e8151d700 refactor Fingerprint to request/response construct 2018-01-24 11:54:02 -05:00
Alex Dadgar
70040f2574 fingerprinters 2017-07-22 20:38:03 -07:00
Alex Dadgar
08c2ba9bc6 Parallel client tests (#2890)
* alloc_runner

* Random tests

* parallel task_runner and no exec compatible check

* Parallel client

* Fail fast and use random ports

* Fix docker port mapping

* Make concurrent pull less timing dependant

* up parallel

* Fixes

* don't build chroots in parallel on travis

* Reduce parallelism on travis with lxc/rkt

* make java test app not run forever

* drop parallelism a little

* use docker ports that are out of the os's ephemeral port range

* Limit even more on travis

* rkt deadline
2017-07-22 19:04:36 -07:00
Alex Dadgar
789a5072a9 Parallel 2017-07-21 12:06:39 -07:00
Michael Schurter
8a7df57227 Test driver network advertisement and checks 2017-06-21 17:19:08 -07:00
Alex Dadgar
7fb1b37e09 Fix vet errors 2017-05-11 13:08:08 -07:00
Michael Schurter
8f518c4c1f Test env+cgroups for exec driver checks 2017-04-25 11:13:06 -07:00
Michael Schurter
db8aabe1c3 Fix circular test imports 2017-04-19 12:42:47 -07:00
Michael Schurter
10cb924b2c Refactor Consul Syncer into new ServiceClient
Fixes #2478 #2474 #1995 #2294

The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.

The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.

Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.

Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
2017-04-19 12:42:47 -07:00
Alex Dadgar
1dbd63ad2a Split driver tests 2017-04-04 15:12:14 -07: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
Michael Schurter
b100293a06 Try to get test passing in Travis 2017-01-17 12:51:19 -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
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
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
Alex Dadgar
0b65a5f95d Executor + Java/Raw Exec/Exec 2016-10-10 11:47:04 -07:00
Alex Dadgar
4bae54741e Secret dir materialized in alloc/task directory 2016-09-02 12:44:05 -07:00
Diptanu Choudhury
3f9ca48802 fixed the exec fingerprinter test 2016-08-23 16:40:56 -05:00
Diptanu Choudhury
938d512f49 Not running tests parallal 2016-08-11 21:53:27 -07:00
Miquel Sabaté Solà
b41608df51 client/driver: added more tests
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-24 08:47:23 +01:00
Alex Dadgar
4c1be8e637 Get tests to pass 2016-03-15 13:28:57 -07:00
Diptanu Choudhury
54d7057912 Writing logs to alloc dir 2016-02-24 20:06:43 -08:00
Alex Dadgar
4afa44c15e driver.test: remove redundant tests 2016-02-23 14:41:52 -08:00
Diptanu Choudhury
d94c28b39c Fixed more tests 2016-02-10 13:54:54 -08:00
Diptanu Choudhury
c8ac49bc91 Removing the killing executor pid tests 2016-02-09 11:29:02 -08:00
Diptanu Choudhury
ed26cb56cc Merge branch 'r-executor-plugin' of github.com:hashicorp/nomad into r-executor-plugin 2016-02-09 10:17:44 -08:00
Diptanu Choudhury
a97181157c Killing the userpid if the plugin is killed while the client is running 2016-02-09 10:17:33 -08:00
Alex Dadgar
f2efece810 more time 2016-02-09 09:43:40 -08:00
Alex Dadgar
e696c7eef7 Fix timeouts between signal and kill 2016-02-08 19:31:57 -08:00
Diptanu Choudhury
0dcdaf50af Fixed a test 2016-02-08 19:00:26 -08:00
Diptanu Choudhury
84b31eff98 Changed a few comments 2016-02-05 18:07:06 -08:00
Diptanu Choudhury
218b9c1261 Using signals to test if proces is alive 2016-02-05 13:05:49 -08:00
Diptanu Choudhury
1ba696abe5 Added a test which shows userpid is killed when plugin can not be re-connected on calling Open 2016-02-05 11:37:13 -08:00
Diptanu Choudhury
49226c4a9c Fixing merge conflicts 2016-02-04 22:55:38 -08:00
Alex Dadgar
0c46a0ec1d Fix tests 2016-02-04 17:27:58 -08:00
Diptanu Choudhury
dbfe40798f Fixed the kill test 2016-02-04 17:00:40 -08:00
Diptanu Choudhury
fedf3c791b Fixed a test 2016-02-04 17:00:39 -08:00
Alex Dadgar
ca69bcd18b Extract artifacts to the root of the task, not in the local directory 2016-02-04 15:18:22 -08:00
Ivo Verberk
0289252ce7 Add comments and small improvements to cgroup fingerprinter 2016-01-29 14:34:29 +01:00
Ivo Verberk
117e035a98 Only enable exec driver when cgroups are available
Make the exec driver fingerprinter periodic to disable the driver when
cgroups become unavailable.
2016-01-27 07:32:32 +01:00
Alex Dadgar
e0c23ec2cd Use TestMultiplier on all waits 2016-01-21 15:24:24 -08:00
Alex Dadgar
85a2c05697 Time Duration fixes 2016-01-21 12:29:13 -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
Alex Dadgar
dccbc0320b Fix tests 2016-01-11 09:58:31 -08:00
Chris Hines
ffda9d71d4 Speed up tests by allowing parallel execution. 2015-11-25 15:56:55 -05:00
Alex Dadgar
7357979089 Revert "Revert "Make drivers take arguments as a list and not as a string"" 2015-11-18 15:16:42 -08:00
Alex Dadgar
d666f5bde1 Revert "Make drivers take arguments as a list and not as a string" 2015-11-18 13:46:43 -08:00