mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
driver/java: pass task network isolation to executor
Without passing the network isolation configuration to the executor, java tasks are not placed in the same network namespace as the other processes in their task group, which breaks Consul Connect.
This commit is contained in:
@@ -344,17 +344,18 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive
|
||||
}
|
||||
|
||||
execCmd := &executor.ExecCommand{
|
||||
Cmd: absPath,
|
||||
Args: args,
|
||||
Env: cfg.EnvList(),
|
||||
User: user,
|
||||
ResourceLimits: true,
|
||||
Resources: cfg.Resources,
|
||||
TaskDir: cfg.TaskDir().Dir,
|
||||
StdoutPath: cfg.StdoutPath,
|
||||
StderrPath: cfg.StderrPath,
|
||||
Mounts: cfg.Mounts,
|
||||
Devices: cfg.Devices,
|
||||
Cmd: absPath,
|
||||
Args: args,
|
||||
Env: cfg.EnvList(),
|
||||
User: user,
|
||||
ResourceLimits: true,
|
||||
Resources: cfg.Resources,
|
||||
TaskDir: cfg.TaskDir().Dir,
|
||||
StdoutPath: cfg.StdoutPath,
|
||||
StderrPath: cfg.StderrPath,
|
||||
Mounts: cfg.Mounts,
|
||||
Devices: cfg.Devices,
|
||||
NetworkIsolation: cfg.NetworkIsolation,
|
||||
}
|
||||
|
||||
ps, err := exec.Launch(execCmd)
|
||||
|
||||
Reference in New Issue
Block a user