This commit is contained in:
Alex Dadgar
2015-12-10 16:17:23 -08:00
4 changed files with 9 additions and 9 deletions

View File

@@ -280,7 +280,7 @@ func (c *ConsulService) registerService(service *structs.Service, task *structs.
for _, check := range service.Checks {
cr := c.makeCheck(service, check, host, port)
if err := c.registerCheck(cr); err != nil {
c.logger.Printf("[ERROR] consul: Error while registerting check %v with consul: %v", check.Name, err)
c.logger.Printf("[ERROR] consul: Error while registering check %v with consul: %v", check.Name, err)
mErr.Errors = append(mErr.Errors, err)
}

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
}

View File

@@ -318,9 +318,10 @@ func TestConfig_LoadConfigsFileOrder(t *testing.T) {
}
expected := []string{
"test-resources/etcnomad/common.hcl",
"test-resources/etcnomad/server.json",
"test-resources/myconf",
// filepath.FromSlash changes these to backslash \ on Windows
filepath.FromSlash("test-resources/etcnomad/common.hcl"),
filepath.FromSlash("test-resources/etcnomad/server.json"),
filepath.FromSlash("test-resources/myconf"),
}
config := config1.Merge(config2)