mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
executor: run exec commands in netns if set
This commit is contained in:
@@ -4,6 +4,7 @@ package executor
|
||||
|
||||
import (
|
||||
hclog "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/nomad/plugins/drivers"
|
||||
)
|
||||
|
||||
func NewExecutorWithIsolation(logger hclog.Logger) Executor {
|
||||
@@ -23,3 +24,7 @@ func (e *UniversalExecutor) getAllPids() (map[int]*nomadPid, error) {
|
||||
func (e *UniversalExecutor) start(command *ExecCommand) error {
|
||||
return e.childCmd.Start()
|
||||
}
|
||||
|
||||
func wrapNetns(f func() error, _ *drivers.NetworkIsolationSpec) error {
|
||||
return f()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user