executor v2 (#4656)

* client/executor: refactor client to remove interpolation

* executor: POC libcontainer based executor

* vendor: use hashicorp libcontainer fork

* vendor: add libcontainer/nsenter dep

* executor: updated executor interface to simplify operations

* executor: implement logging pipe

* logmon: new logmon plugin to manage task logs

* driver/executor: use logmon for log management

* executor: fix tests and windows build

* executor: fix logging key names

* executor: fix test failures

* executor: add config field to toggle between using libcontainer and standard executors

* logmon: use discover utility to discover nomad executable

* executor: only call libcontainer-shim on main in linux

* logmon: use seperate path configs for stdout/stderr fifos

* executor: windows fixes

* executor: created reusable pid stats collection utility that can be used in an executor

* executor: update fifo.Open calls

* executor: fix build

* remove executor from docker driver

* executor: Shutdown func to kill and cleanup executor and its children

* executor: move linux specific universal executor funcs to seperate file

* move logmon initialization to a task runner hook

* client: doc fixes and renaming from code review


* taskrunner: use shared config struct for logmon fifo fields

* taskrunner: logmon only needs to be started once per task
This commit is contained in:
Nick Ethier
2018-09-24 14:37:45 -04:00
committed by Michael Schurter
parent da8f053a0d
commit 5b14d24bf4
68 changed files with 4186 additions and 2048 deletions

View File

@@ -43,7 +43,7 @@ func TestJavaDriver_Fingerprint(t *testing.T) {
Resources: structs.DefaultResources(),
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
node := &structs.Node{
Attributes: map[string]string{
@@ -100,7 +100,7 @@ func TestJavaDriver_StartOpen_Wait(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -156,7 +156,7 @@ func TestJavaDriver_Start_Wait(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -222,7 +222,7 @@ func TestJavaDriver_Start_Kill_Wait(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -288,7 +288,7 @@ func TestJavaDriver_Signal(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -357,7 +357,7 @@ func TestJavaDriver_User(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
if _, err := d.Prestart(ctx.ExecCtx, task); err != nil {
@@ -399,7 +399,7 @@ func TestJavaDriver_Start_Wait_Class(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -469,7 +469,7 @@ func TestJavaDriver_Start_Kill(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory
@@ -506,7 +506,7 @@ func TestJavaDriver_Start_Kill(t *testing.T) {
}
ctx := testDriverContexts(t, task)
defer ctx.AllocDir.Destroy()
defer ctx.Destroy()
d := NewJavaDriver(ctx.DriverCtx)
// Copy the test jar into the task's directory