Fabien Ninoles
27cf4995ce
- Clean up for windows compilation.
...
- Set CREATE_NEW_PROCESS_GROUP for Windows subprocess.
- Ensure we only kill actual process that need to.
2018-04-14 13:58:42 -04:00
Michael Schurter
3836b8a335
Merge pull request #3572 from emate/master
...
Create new process group on process startup.
2018-04-13 11:56:38 -07:00
Michael Schurter
1022170bf3
executor: increase level for helpful log lines
...
Should help with debugging issues like #3971
2018-03-21 11:53:58 -07:00
Marcin Matlaszek
6019a88824
Make raw_exec processes cleanup function more precise.
2018-03-20 13:40:21 +01:00
Marcin Matlaszek
bb36c122e2
Fix errors when trying to kill whole process group.
2018-03-20 13:40:21 +01:00
Marcin Matlaszek
86d650d7b0
Make starting & cleaning process group Windows compatible.
2018-03-20 13:40:21 +01:00
Marcin Matlaszek
79c139f2ef
Create new process group on process startup.
...
Clean up by sending SIGKILL to the whole process group.
2018-03-20 13:40:21 +01:00
Josh Soref
db166c6cf6
spelling: remnants
2018-03-11 18:41:26 +00:00
Josh Soref
b6ec60fb5f
spelling: isolation
2018-03-11 18:19:02 +00:00
Chelsea Holland Komlo
77ab41124b
set default kill signal on executor shutdown
2017-12-07 11:40:15 -05:00
Chelsea Holland Komlo
350319239c
change location of default kill signal
2017-12-06 17:48:25 -05:00
Chelsea Holland Komlo
b08611cfac
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Chelsea Holland Komlo
80de7d5ebd
allow controlling the stop signal in exec/raw_exec
2017-12-06 11:28:45 -05:00
Adam Stankiewicz
cefbc72b49
Remove AllocID from ExecutorContext
2017-10-13 17:07:49 +02:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Michael Schurter
b69e060071
Log PID when sending signals
2017-06-12 11:11:36 -07:00
Michael Schurter
d2c08ff24b
Refactor TaskEnvironment into Builder and TaskEnv
2017-05-23 13:53:33 -07:00
Michael Schurter
897b516117
Reuse ExecScript implementation
2017-05-04 16:21:40 -07:00
Michael Schurter
095d2ee340
Switch java/exec to use Exec in Executor
2017-04-21 16:25:49 -07:00
Michael Schurter
e204a287ed
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
a1a7941dec
Various fixes
...
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Alex Dadgar
5be806a3df
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
Diptanu Choudhury
b1d0078db5
Filter executor log messages
2017-01-12 11:54:19 -08:00
Michael Schurter
579f378bee
Remove debug logging
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
Alex Dadgar
ddf101d7a2
Interpolate all check related variables
2016-11-08 14:43:46 -08:00
Diptanu Choudhury
f0e2178790
Making the executor lock the logger
2016-10-28 10:57:35 -07:00
Alex Dadgar
150b678a6b
Merge pull request #1806 from hashicorp/f-docker4mac-fixes
...
A couple fixes to make Docker For Mac work
2016-10-27 09:29:40 -07:00
Alex Dadgar
3c4a27e72b
Fix panic
2016-10-25 17:27:13 -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
320b89d57a
Constant time space tracking of pids
2016-09-27 16:57:26 -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
be272168c7
Rename resourceContainer{,Context} and resCon{,Ctx}.
2016-07-11 00:02:55 -07:00
Sean Chittenden
d4fe69ddf9
Update comments and pushdown a lock into the resource container
2016-07-10 00:12:59 -07:00
Sean Chittenden
a5dc6c2da9
Push the Client's cleanup of Cgroups down
2016-07-09 23:45:33 -07:00
Sean Chittenden
5dbc0bf382
Rename resourceContainer.cleanup() to executorCleanup()
...
Not to be confused with the imminent ClientCleanup().
2016-07-09 23:25:33 -07:00
Sean Chittenden
5f8f0a50ac
Begin cgroup pushdown into platform specific files
2016-07-09 23:01:14 -07:00
Sean Chittenden
7b9961f09b
Initialize the stats helpers before accessing them for the first time
2016-06-17 13:23:30 -07:00
Alex Dadgar
4b04e503f3
address comments
2016-06-13 17:32:18 -07:00
Alex Dadgar
8bbf4a55e5
Fix IDs and domain scoping
2016-06-13 16:30:58 -07:00
Diptanu Choudhury
d019d8ef8e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00
Alex Dadgar
232654cdee
register checks
2016-06-12 21:28:56 -07:00
Alex Dadgar
a82c2bb058
Do not reconcile in client and cleanup executor a bit
2016-06-12 18:22:07 -07:00
Alex Dadgar
8e231fa382
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Alex Dadgar
2628827b7c
Merge pull request #1262 from hashicorp/remove-artifact-check
...
Removing artifact check for java and qemu drivers
2016-06-12 11:21:18 -07:00
Diptanu Choudhury
beb362e202
Setting a flag to indicate whether fs isolation is indeed happening
2016-06-12 15:43:24 +02:00
Diptanu Choudhury
641cf50682
Not converting the abs path relative to task dir for drivers which enforce FS isolation only in linux
2016-06-12 13:54:30 +02:00