diff --git a/client/driver/raw_exec.go b/client/driver/raw_exec.go index 5b1d9826957..9491873ba45 100644 --- a/client/driver/raw_exec.go +++ b/client/driver/raw_exec.go @@ -3,7 +3,6 @@ package driver import ( "fmt" "path/filepath" - "strconv" "time" "github.com/hashicorp/nomad/client/allocdir" @@ -43,10 +42,7 @@ func NewRawExecDriver(ctx *DriverContext) Driver { func (d *RawExecDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error) { // Check that the user has explicitly enabled this executor. - enabled, err := strconv.ParseBool(cfg.ReadDefault(rawExecConfigOption, "false")) - if err != nil { - return false, fmt.Errorf("Failed to parse %v option: %v", rawExecConfigOption, err) - } + enabled := cfg.ReadBoolDefault(rawExecConfigOption, false) if enabled { d.logger.Printf("[WARN] driver.raw_exec: raw exec is enabled. Only enable if needed") diff --git a/command/agent/config.go b/command/agent/config.go index e94ce2e4ce2..e3fb3ae179f 100644 --- a/command/agent/config.go +++ b/command/agent/config.go @@ -257,6 +257,9 @@ func DevConfig() *Config { } else if runtime.GOOS == "linux" { conf.Client.NetworkInterface = "lo" } + conf.Client.Options = map[string]string{ + "driver.raw_exec.enable": "true", + } return conf }