Change:
Actually appending fqdn suffix already causes issue for non-resolvable node names based on today: Today when NodeController "registers" nodes in SyncCloud by getting bare instance names () from GCE, and recreating the fqdn and append it to instance names().

Discussion:
log_level_logfile: debug EOF <del> hostnamef=$(hostname -f) </del> <ins> hostnamef=$(uname -n) </ins> apt-get install -y ipcalc netmask=$(ipcalc $MINION_IP_RANGE | grep Netmask | awk '{ print $2 }') network=$(ipcalc $MINION_IP_RANGE | grep Address | awk '{ print $2 }')

fi if [ "$cert_ip" == "_use_azure_dns_name_" ]; then <del> cert_ip=$(hostname -f | awk -F. '{ print $2 }').cloudapp.net </del> <ins> cert_ip=$(uname -n | awk -F. '{ print $2 }').cloudapp.net </ins> use_cn=true fi

Start etcd and verify that it is running: ```bash <del> $ sudo docker run -d --hostname $(hostname -f) --name etcd -p 4001:4001 -p 7001:7001 coreos/etcd </del> <ins> $ sudo docker run -d --hostname $(uname -n) --name etcd -p 4001:4001 -p 7001:7001 coreos/etcd </ins> ``` ```bash

File Path passed as a flag on the command line. This file is rechecked every 20 seconds (configurable with a flag). HTTP endpoint HTTP endpoint passed as a parameter on the command line. This endpoint is checked every 20 seconds (also configurable with a flag). <del> etcd server The Kubelet will reach out and do a watch on an etcd server. The etcd path that is watched is /registry/hosts/$(hostname -f). As this is a watch, changes are noticed and acted upon very quickly. </del> <ins> etcd server The Kubelet will reach out and do a watch on an etcd server. The etcd path that is watched is /registry/hosts/$(uname -n). As this is a watch, changes are noticed and acted upon very quickly. </ins> HTTP server The kubelet can also listen for HTTP and respond to a simple API (underspec'd currently) to submit a new manifest.

.nf File Path passed as a flag on the command line. This file is rechecked every 20 seconds (configurable with a flag). HTTP endpoint HTTP endpoint passed as a parameter on the command line. This endpoint is checked every 20 seconds (also configurable with a flag). <del> etcd server The Kubelet will reach out and do a watch on an etcd server. The etcd path that is watched is /registry/hosts/$(hostname -f). As this is a watch, changes are noticed and acted upon very quickly. </del> <ins> etcd server The Kubelet will reach out and do a watch on an etcd server. The etcd path that is watched is /registry/hosts/$(uname -n). As this is a watch, changes are noticed and acted upon very quickly. </ins> HTTP server The kubelet can also listen for HTTP and respond to a simple API (underspec'd currently) to submit a new manifest. .fi

`cbr-cidr` | (Optional) The minion IP address range used for the docker container bridge. `cloud` | (Optional) Which IaaS platform is used to host kubernetes, *gce*, *azure*, *aws*, *vagrant* `etcd_servers` | (Optional) Comma-delimited list of IP addresses the kube-apiserver and kubelet use to reach etcd.  Uses the IP of the first machine in the kubernetes_master role, or 127.0.0.1 on GCE. <del> `hostnamef` | (Optional) The full host name of the machine, i.e. hostname -f (only used on Azure) </del> <ins> `hostnamef` | (Optional) The full host name of the machine, i.e. uname -n </ins> `node_ip` | (Optional) The IP address to use to address this node `minion_ip` | (Optional) Mapped to the kubelet hostname_override, K8S TODO - change this name `network_mode` | (Optional) Networking model to use among nodes: *openvswitch*

"io/ioutil" "net" "net/http" <del> "os/exec" </del> "path" "strconv" "strings"

return strconv.FormatUint(inst.Id, 10), nil } <del> // fqdnSuffix is hacky function to compute the delta between hostame and hostname -f. func fqdnSuffix() (string, error) { fullHostname, err := exec.Command("hostname", "-f").Output() if err != nil { return "", err } hostname, err := exec.Command("hostname").Output() if err != nil { return "", err } return strings.TrimSpace(string(fullHostname)[len(string(hostname)):]), nil } </del> // List is an implementation of Instances.List. func (gce *GCECloud) List(filter string) ([]string, error) { <del> // GCE gives names without their fqdn suffix, so get that here for appending. // This is needed because the kubelet looks for its jobs in /registry/hosts/<fqdn>/pods // We should really just replace this convention, with a negotiated naming protocol for kubelet's // to register with the master. suffix, err := fqdnSuffix() if err != nil { return []string{}, err } if len(suffix) > 0 { suffix = "." + suffix } </del> listCall := gce.service.Instances.List(gce.projectID, gce.zone) if len(filter) > 0 { listCall = listCall.Filter("name eq " + filter)

} var instances []string for _, instance := range res.Items { <del> instances = append(instances, instance.Name+suffix) </del> <ins> instances = append(instances, instance.Name) </ins> } return instances, nil }

func GetHostname(hostnameOverride string) string { hostname := []byte(hostnameOverride) if string(hostname) == "" { <del> // Note: We use exec here instead of os.Hostname() because we // want the FQDN, and this is the easiest way to get it. fqdn, err := exec.Command("hostname", "-f").Output() </del> <ins> fqdn, err := exec.Command("uname", "-n").Output() </ins> if err != nil { glog.Fatalf("Couldn't determine hostname: %v", err) }