From 170f426fb62543864c572393e382832cb69dd10e Mon Sep 17 00:00:00 2001 From: Yu-Ju Hong Date: Fri, 8 May 2015 10:03:43 -0700 Subject: [PATCH] Don't use the first token `uname -n` as the hostname This change partially reverts the change made in #7910, which takes only the first token of `uname -n` as the hostname. --- pkg/util/node.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/util/node.go b/pkg/util/node.go index c0f0eabc88a..1607ed94b13 100644 --- a/pkg/util/node.go +++ b/pkg/util/node.go @@ -30,10 +30,7 @@ func GetHostname(hostnameOverride string) string { if err != nil { glog.Fatalf("Couldn't determine hostname: %v", err) } - chunks := strings.Split(string(nodename), ".") - // nodename could be a fully-qualified domain name or not. Take the first - // word of nodename as the hostname for consistency. - hostname = chunks[0] + hostname = string(nodename) } return strings.ToLower(strings.TrimSpace(hostname)) }