Making the java driver apply resource constraints and limits
This commit is contained in:
parent
1ba1baa9ac
commit
f4ea6a15c8
|
@ -158,10 +158,13 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
executorCtx := &executor.ExecutorContext{
|
executorCtx := &executor.ExecutorContext{
|
||||||
TaskEnv: d.taskEnv,
|
TaskEnv: d.taskEnv,
|
||||||
AllocDir: ctx.AllocDir,
|
AllocDir: ctx.AllocDir,
|
||||||
TaskName: task.Name,
|
TaskName: task.Name,
|
||||||
TaskResources: task.Resources,
|
TaskResources: task.Resources,
|
||||||
|
FSIsolation: true,
|
||||||
|
ResourceLimits: true,
|
||||||
|
UnprivilegedUser: true,
|
||||||
}
|
}
|
||||||
ps, err := exec.LaunchCmd(&executor.ExecCommand{Cmd: "java", Args: args}, executorCtx)
|
ps, err := exec.LaunchCmd(&executor.ExecCommand{Cmd: "java", Args: args}, executorCtx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue