mirror of
https://github.com/kemko/nomad.git
synced 2026-01-09 03:45:41 +03:00
Merge branch 'master' of https://github.com/hashicorp/nomad
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user