mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Merge pull request #558 from hashicorp/b-raw-exec-dev
Enable raw exec in dev mode
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user