Merge pull request #558 from hashicorp/b-raw-exec-dev

Enable raw exec in dev mode
This commit is contained in:
Chris Bednarski
2015-12-10 15:29:17 -08:00
2 changed files with 4 additions and 5 deletions

View File

@@ -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")

View File

@@ -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
}