Michael Schurter
a3a3656dbb
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
dc68aa1a5a
Return errors from cleanup and let TaskRunner retry
2017-01-12 17:21:54 -08:00
Michael Schurter
4d081490e6
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
baf6f078d6
Remove task name prefix from executor logs
2017-01-05 16:31:56 -08:00
Michael Schurter
3ea09ba16a
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
ea92cd102a
Append host env vars on every task env
2016-12-20 12:24:24 -08:00
Michael Schurter
770ed703d0
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
0cbd0188b1
Move the wait result to bottom of methods
2016-11-04 14:58:55 -07:00
Alex Dadgar
41b5679015
Advertise signalling abilities
2016-10-19 15:06:23 -07:00
Alex Dadgar
53eeec9bc1
Merge pull request #1801 from hashicorp/f-signals
...
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Alex Dadgar
86238387e7
Send Executor Ctx separately
2016-10-12 11:35:29 -07:00
Alex Dadgar
00a1234c55
Executor + Java/Raw Exec/Exec
2016-10-10 11:47:04 -07:00
Alex Dadgar
280af8f4d1
Docker + Qemu
2016-10-10 11:47:04 -07:00
Jay Oster
2ae059b41d
Address review comments
...
- Simplify map length check in Linux Executor
- Added a `chroot_env` test for config parser
- Moved `ChrootEnv` field from ExecutorCommand to ExecutorContext
- Added a test for `chroot_env` functionality
2016-08-04 15:33:06 -07:00
Jay Oster
7df692226a
Add config field to specify chroot mapping for exec driver
...
- Same format as used by the internal chroot mapping
- Map: source_path -> dest_path
- Example HCL:
client {
chroot_env {
"/etc" = "/etc"
"/lib" = "/lib"
"/opt/projects/foo/bin" = "/usr/bin"
}
}
2016-08-03 17:17:17 -07:00
Sean Chittenden
a5dc6c2da9
Push the Client's cleanup of Cgroups down
2016-07-09 23:45:33 -07:00
Alex Dadgar
e952540f6f
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Diptanu Choudhury
6c1b60ff07
Add the Stats api to driverhandle
2016-05-28 19:42:34 -07:00
Sean Chittenden
d1268cfb76
Break out the windows vs UNIX Fingerprinter
...
cgroup's are applicable to Windows and will require a more specific abstraction. Stub out the difference. The *NIX exec drivers will likely be broken out over time (e.g. *BSD and Solaris).
2016-05-07 12:37:15 -07:00
Sean Chittenden
09f7d5e595
Prefer `golang.org/x/sys/unix` where appropriate
...
Favor the `unix` package on *NIX platforms vs the now frozen `syscall` package.
2016-05-07 11:01:45 -07:00
Alex Dadgar
736ef76cc1
Put the executor into the cgroup to avoid a fork race
2016-04-18 17:59:08 -07:00
Ivo Verberk
6d0191a485
Add missing comments on exported Validate function
2016-04-10 01:15:09 +02:00
Ivo Verberk
13a2d62bfa
Implement configuration validation for all task drivers
2016-04-10 00:42:57 +02:00
Ivo Verberk
542603dec6
Add helper to validate raw configuration data
2016-04-10 00:42:43 +02:00
Diptanu Choudhury
d9afcc1293
Using the paths of cgroups to reconstruct the manager
2016-04-02 12:37:19 -07:00
Diptanu Choudhury
121773607a
Merge pull request #1020 from hashicorp/f-capture-signals
...
Capturing signals from wait
2016-04-02 11:13:04 -07:00
Diptanu Choudhury
e47ead97da
Capturing signals from wait
2016-04-01 14:31:19 -07:00
Diptanu Choudhury
8c7c48b01a
Logging in fingerprinters only when state changes
2016-04-01 02:22:17 -07:00
Diptanu Choudhury
fd3c05a2be
Making driver fingerprinters run periodically and unblocking evals when node registration happens
2016-03-31 18:11:27 -07:00
Diptanu Choudhury
f517eb16de
Added version to executor
2016-03-29 22:24:22 -07:00
Diptanu Choudhury
2b773b0a39
Added the Version method to executor
2016-03-29 22:23:03 -07:00
Diptanu Choudhury
a6711ea25f
Introducing ConsulContext
2016-03-24 15:57:16 -07:00
Diptanu Choudhury
f09bb1572a
Fixed merge conflicts
2016-03-24 15:09:50 -07:00
Diptanu Choudhury
2a5f300f92
Added a check type for consul service to delegate certain checks
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
60fc9919f7
Changing the log line
2016-03-24 14:53:53 -07:00
Diptanu Choudhury
6a62d4f452
Fixing check registration in perform sync
2016-03-24 14:12:09 -07:00
Alex Dadgar
fc0e48b0ec
Merge pull request #950 from mssola/raw-exec-user
...
client: added the "user" option to tasks
2016-03-24 08:57:13 -07:00
Diptanu Choudhury
76343a3748
Merge pull request #972 from hashicorp/scripts
...
Moving consul service to executor
2016-03-24 00:12:45 -07:00
Diptanu Choudhury
62242595fc
Using the name of the task and the alloc id in the service name
2016-03-23 17:35:29 -07:00
Diptanu Choudhury
54a5e795a5
Hooking up the executor in all drivers
2016-03-23 13:19:45 -07:00
Alex Dadgar
f3d09755c5
Pass environment variables from host to exec based tasks
2016-03-23 13:01:45 -07:00
Diptanu Choudhury
f6a932194f
Removing references to old consul services and adding consul config to executor context
2016-03-23 12:19:19 -07:00
Miquel Sabaté Solà
8c56c64615
client/driver: added the `user` config value
...
This way Nomad allows to set which user has to run the task.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-23 12:57:31 +01:00
Alex Dadgar
c85dfdf9a0
Merge branch 'master' into f-artifact-location
2016-03-19 12:50:44 -07:00
Alex Dadgar
f4bb3a9801
binary lookup path
2016-03-19 12:18:10 -07:00
Diptanu Choudhury
ddbf18f02a
Removing all the destroy logic from wait and calling exit after wait on all drivers
2016-03-18 12:04:11 -07:00
Diptanu Choudhury
3c7b83b393
Introduced a method in executor to launch syslog server
2016-03-18 11:49:10 -07:00
Alex Dadgar
9f878a16bf
Download artifacts and remove old code for drivers
2016-03-15 13:28:57 -07:00
Alex Dadgar
929e705ba1
Updating kill timeout adheres to operator specified maximum
2016-03-03 09:21:21 -08:00
Alex Dadgar
61972c9ddc
Refactor task runner to include driver starting into restart policy and add recoverable errors
2016-02-28 16:56:05 -08:00