diff --git a/CHANGELOG.md b/CHANGELOG.md index 328ed9a7423..1d00fcc18ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ IMPROVEMENTS: * client: Don't force uppercase meta keys in env vars [GH-2338] * client: Reproducible Node ID on OSes that provide system-level UUID [GH-2277] + * client: Don't exec `uname -r` for node attribute kernel.version [GH-2380] * driver/docker: Add support for volume drivers [GH-2351] * driver/docker: Docker image coordinator and caching [GH-2361] * jobspec: Add leader task to allow graceful shutdown of other tasks within diff --git a/client/fingerprint/host.go b/client/fingerprint/host.go index a40a473f608..a7b8ed6c8ae 100644 --- a/client/fingerprint/host.go +++ b/client/fingerprint/host.go @@ -1,11 +1,8 @@ package fingerprint import ( - "fmt" "log" - "os/exec" "runtime" - "strings" "github.com/hashicorp/nomad/client/config" "github.com/hashicorp/nomad/nomad/structs" @@ -35,15 +32,7 @@ func (f *HostFingerprint) Fingerprint(cfg *config.Config, node *structs.Node) (b node.Attributes["os.version"] = hostInfo.PlatformVersion node.Attributes["kernel.name"] = runtime.GOOS - node.Attributes["kernel.version"] = "" - - if runtime.GOOS != "windows" { - out, err := exec.Command("uname", "-r").Output() - if err != nil { - return false, fmt.Errorf("Failed to run uname: %s", err) - } - node.Attributes["kernel.version"] = strings.Trim(string(out), "\n") - } + node.Attributes["kernel.version"] = hostInfo.KernelVersion node.Attributes["unique.hostname"] = hostInfo.Hostname