Michael Schurter
2822dd760c
Handle createdResourcs=nil
...
Combined with b522c472fd this fixes #2256
Without these two commits in place upgrades to 0.5.3 panics.
2017-01-31 10:51:32 -08:00
Alex Dadgar
b522c472fd
Add nil guard
2017-01-31 09:19:59 -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
269b3c7e14
Merge pull request #2186 from hashicorp/f-driver-cleanup
...
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -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
db096b23b5
Switch to use recoverable errors from Cleanup
...
TaskRunner handles retrying but Cleanup handles all of CreatedResources.
2017-01-13 16:46:08 -08:00
Michael Schurter
1ec5c930a6
Return errors from cleanup and let TaskRunner retry
2017-01-12 17:21:54 -08:00
Diptanu Choudhury
a066d90313
Added executorconfig
2017-01-12 15:47:58 -08:00
Diptanu Choudhury
84137b02c5
Filter executor log messages
2017-01-12 11:54: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
Alex Dadgar
fa7db8cdd4
Don't retrieve Driver Stats if unsupported
...
This PR makes us only try to collect stats once if the Driver doesn't
support collecting stats.
Fixes https://github.com/hashicorp/nomad/issues/1986
2017-01-09 13:47:06 -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
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
aaa70ab7b8
Append host env vars on every task env
2016-12-20 12:24:24 -08:00
Alex Dadgar
cb10b277eb
Use new combined meta data function in env
2016-12-16 10:45:09 -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
9b18008ccd
Agent
2016-11-01 10:39:15 -07:00
Alex Dadgar
008d91aa56
Advertise signalling abilities
2016-10-19 15:06:23 -07:00
Alex Dadgar
917c7e5085
Merge pull request #1801 from hashicorp/f-signals
...
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Michael Schurter
2ae0c85290
Add NOMAD_JOB_NAME to environment
2016-10-11 11:20:42 -07:00
Alex Dadgar
1a3585b572
Docker + Qemu
2016-10-10 11:47:04 -07:00
Alex Dadgar
ee67630889
Struct and parse
2016-09-21 11:31:09 -07:00
Alex Dadgar
bec6adb2ee
Vault token threaded
2016-09-14 13:30:01 -07:00
Alex Dadgar
4bae54741e
Secret dir materialized in alloc/task directory
2016-09-02 12:44:05 -07:00
Alex Dadgar
335cababe1
Revert "Introduce a Secret/ directory"
2016-09-01 17:23:15 -07:00
Alex Dadgar
7f18d94976
Merge pull request #1671 from hashicorp/f-secret-dir2
...
Introduce a Secret/ directory
2016-09-01 09:56:17 -07:00
Alex Dadgar
dfab22cd9f
environment variables
2016-08-31 13:56:11 -07:00
Michael Schurter
53d7dfb1b7
Remove unused embedded lock on ExecContext
2016-08-26 11:58:03 -07:00
Alex Dadgar
1a7df4e7d2
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Diptanu Choudhury
9a851a11ee
Added the PidStats method on the executor
2016-05-28 19:42:34 -07:00
Diptanu Choudhury
1cae57aee9
Add the Stats api to driverhandle
2016-05-28 19:42:34 -07:00
Ivo Verberk
51755c513f
Implement configuration validation for all task drivers
2016-04-10 00:42:57 +02:00
Ivo Verberk
92bf6f1ad0
Add helper to validate raw configuration data
2016-04-10 00:42:43 +02:00
Alex Dadgar
bb81d2ebd0
add job and task group meta
2016-03-24 17:39:09 -07:00
Diptanu Choudhury
247dea0235
Merge pull request #896 from hashicorp/f-task-instance
...
Add allocation index environment variable
2016-03-09 18:34:32 -08:00
Alex Dadgar
495d0e6dc2
Add allocation index environment variable
2016-03-09 18:09:51 -08:00
Alex Dadgar
6ef841bc34
Updating kill timeout adheres to operator specified maximum
2016-03-03 09:21:21 -08:00
Alex Dadgar
e0b1d7a963
Add Alloc ID/Name and Task Name to environment variables
2016-03-01 16:08:21 -08:00
Alex Dadgar
ccaf000fd6
Fix min duration
2016-02-08 19:46:46 -08:00
Alex Dadgar
e696c7eef7
Fix timeouts between signal and kill
2016-02-08 19:31:57 -08:00
Alex Dadgar
03aca9887b
Client handles updates to KillTimeout and Restart Policy
2016-02-03 19:43:44 -08: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
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 Bednarski
63439ee3f7
Squash []map[string]type for port_map and labels into map[string]type
2015-11-19 21:29:37 -08:00
Chris Bednarski
f75404ecf7
Fixed some issues with expose, port mapping, and environment variables
...
- Port mapping now works for reserved ports as well as dynamic ports
- Environment variables were being set twice in two different ways; now they are only set once
- Comprehensive tests for exposed ports, forwarded ports, and environment variables
- Cleaned up / DRYed up a lot of test code
2015-11-19 19:08:21 -08:00
Chris Bednarski
1d1e4bdd08
Merge branch 'master' into f-port-labels
2015-11-16 16:02:38 -08:00
Alex Dadgar
f4b461f97a
Track Task State in the client and capture Wait results
2015-11-16 15:14:21 -08:00