Skip to content

Commit

Permalink
Merge pull request #558 from hashicorp/b-raw-exec-dev
Browse files Browse the repository at this point in the history
Enable raw exec in dev mode
  • Loading branch information
cbednarski committed Dec 10, 2015
2 parents 6102711 + 5bf8a1f commit 73c707c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 1 addition & 5 deletions client/driver/raw_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package driver
import (
"fmt"
"path/filepath"
"strconv"
"time"

"github.com/hashicorp/nomad/client/allocdir"
Expand Down Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions command/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 73c707c

Please sign in to comment.