Michael Schurter
a13607f2d9
client: properly support hook env vars
...
The old approach was incomplete. Hook env vars are now:
* persisted and restored between agent restarts
* deterministic (LWW if 2 hooks set the same key)
2018-11-27 17:25:33 -08:00
Alex Dadgar
429c5bb885
Device hook and devices affect computed node class
...
This PR introduces a device hook that retrieves the device mount
information for an allocation. It also updates the computed node class
computation to take into account devices.
TODO Fix the task runner unit test. The environment variable is being
lost even though it is being properly set in the prestart hook.
2018-11-27 17:25:33 -08:00
Michael Schurter
5d6d4bf290
Merge pull request #4883 from hashicorp/f-graceful-shutdown
...
Support graceful shutdowns in agent
2018-11-27 15:55:15 -06:00
Michael Schurter
31f113ba4d
client: support graceful shutdowns
...
Client.Shutdown now blocks until all AllocRunners and TaskRunners have
exited their Run loops. Tasks are left running.
2018-11-19 16:39:30 -08:00
Michael Schurter
9189173649
tests: fix tests post-rebase
2018-11-15 17:40:56 -08:00
Michael Schurter
b878bbf3f7
client: add new nested variables to task's hcl ctx
...
The error messages are really bad, but it's extremely difficult to
produce good error messages without the original HCL.
2018-11-15 16:26:25 -08:00
Michael Schurter
43b359914b
client: interpolate driver configurations
...
Also add missing SetDriverNetwork calls.
2018-11-15 16:25:57 -08:00
Mahmood Ali
5c906aa085
convert all config durations to strings in tests
2018-11-13 10:21:40 -05:00
Michael Schurter
d5c8e5bd26
client: fix ar and tr tests
2018-11-05 12:32:05 -08:00
Michael Schurter
fdbe446ea6
client: first pass at implementing task restoring
...
Task restoring works but dead tasks may be restarted
2018-11-05 12:32:05 -08:00
Alex Dadgar
2e535aefcc
move files around
2018-10-16 16:56:55 -07:00
Michael Schurter
fae947419d
tr: add validate task hook
2018-10-16 16:53:29 -07:00
Alex Dadgar
32f9da9e07
small fixes
2018-09-15 16:42:38 -07:00
Alex Dadgar
98c7abe541
Tests only use testlog package logger
2018-06-13 15:40:56 -07:00
Alex Dadgar
3d3490fdf1
test fixes
2018-06-12 17:45:39 -07:00
Alex Dadgar
a62e412b88
Refactor - wip
2018-06-12 10:23:45 -07:00