Commit Graph

42 Commits

Author SHA1 Message Date
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
22c5999c09 darwin test fixes 2017-07-22 19:48:47 -07:00
Alex Dadgar
d4e35815a1 executor and logging pkg 2017-07-21 12:14:54 -07:00
Michael Schurter
aa0e977f1c Fix executor tests 2017-05-26 16:46:03 -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
Michael Schurter
16fb45e4ba Fix tests broken by API change 2017-03-02 15:54:12 -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
c920d3cbb0 Fix unreachable function in tests 2017-01-25 20:58:24 -08:00
Michael Schurter
34cc7a70ad Switch to a less timing dependent test command
`/usr/bin/yes` could produce output very quickly (100s of MBps on my
laptop) and therefore could cause log files to roll over.

A bash loop with a sleep avoids that issue. The test is slower but
should be much more resilient to the massive timing differences between
workstations and Travis.
2017-01-09 15:40:53 -08:00
Michael Schurter
ed8b3cd37d Fix executor tests 2017-01-06 11:39:18 -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
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
358c43333d Send Executor Ctx separately 2016-10-12 11:35:29 -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
Ivo Verberk
13071e9846 Disk resource monitoring and enforcement 2016-08-18 07:59:03 +02:00
Sean Chittenden
beee613f13 Move unit tests around into per-platform where appropriate. 2016-07-09 23:56:31 -07:00
Alex Dadgar
c5059fc7c4 Rename ConsulService back to Service 2016-06-12 16:36:49 -07:00
Sean Chittenden
54838b9eba Rename structs.Task's Service attribute to ConsulService 2016-06-10 15:54:39 -04:00
Diptanu Choudhury
b51b08b39e Added a test to validate we are collecting stats 2016-05-28 19:59:20 -07:00
Diptanu Choudhury
f59ad3da53 Fixed the logic of scanpids 2016-05-28 19:59:20 -07:00
Diptanu Choudhury
03dcb7f541 Adding a test to check whether constraints are applied and cgroups are removed 2016-04-02 12:39:34 -07:00
Diptanu Choudhury
1a0c35a196 Capturing signals from wait 2016-04-01 14:31:19 -07:00
Diptanu Choudhury
87399078f0 Supporting interpolation in service name, check name/protocol/path 2016-03-28 15:52:57 -07:00
Diptanu Choudhury
8340912a28 Added support for interpolation in check cmd and args 2016-03-28 15:02:00 -07:00
Diptanu Choudhury
cf1aba56a8 Interpolating service tags 2016-03-28 15:02:00 -07:00
Alex Dadgar
63e172747a Reduce verbosity of alloc-status 2016-03-20 16:52:24 -07:00
Alex Dadgar
a55b4fcdaa Merge branch 'master' into f-artifact-location 2016-03-19 12:50:44 -07:00
Alex Dadgar
74ad85e33d binary lookup path 2016-03-19 12:18:10 -07:00
Abhishek Chanda
18d5febe41 Fix missing import 2016-03-18 23:00:34 -07:00
Diptanu Choudhury
f366e2970c Added some comments 2016-03-18 15:04:15 -07:00
Diptanu Choudhury
0f355e8f87 Introduced a method in executor to launch syslog server 2016-03-18 11:49:10 -07:00
Diptanu Choudhury
71fb58cea0 Added a comment 2016-03-02 12:56:56 -08:00
Diptanu Choudhury
c4b048df5e Added a test for making sure executor destroy works 2016-03-02 11:05:08 -08:00
Diptanu Choudhury
54d7057912 Writing logs to alloc dir 2016-02-24 20:06:43 -08:00
Diptanu Choudhury
3da5e5020a Closing the rotators when the process finishes 2016-02-23 13:32:17 -08:00
Diptanu Choudhury
961abeef50 Fixed more client executor tests 2016-02-11 11:13:45 -08:00
Diptanu Choudhury
95284307c5 Fixed the executor test 2016-02-11 10:58:18 -08:00
Diptanu Choudhury
b3d18a7a07 Added a test which isolates and constraints a process using the executor 2016-02-05 11:07:16 -08:00
Diptanu Choudhury
2533156b9e Corrected comments and making the plugins write to unique log files 2016-02-05 10:49:54 -08:00
Diptanu Choudhury
2b8cdc47d3 Moved packages around 2016-02-04 17:00:41 -08:00