Bug 1284621 - Setting the nodeIP is overriding the node hostname
Setting the nodeIP is overriding the node hostname
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Ravi Sankar
Meng Bo
:
: 1284614 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-23 11:51 EST by Federico Simoncelli
Modified: 2016-01-29 15:57 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-29 15:57:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Federico Simoncelli 2015-11-23 11:51:42 EST
Description of problem:
With reference to the issue:

https://github.com/openshift/openshift-ansible/issues/943

The OpenShift nodes are registering themselves using the nodeIP instead of the regular hostname:

    if len(options.NodeIP) > 0 {
            server.HostnameOverride = options.NodeIP
    } else {
            server.HostnameOverride = options.NodeName
    }

https://github.com/openshift/origin/blob/v1.0.8/pkg/cmd/server/kubernetes/node_config.go#L114

As a result the nodes set the kubernetes.io/hostname and externalID with the ip address instead of the hostname:

NAME                              LABELS                                STATUS    AGE
oshift01.eng.lab.tlv.redhat.com   kubernetes.io/hostname=10.35.19.229   Ready     8h
oshift02.eng.lab.tlv.redhat.com   kubernetes.io/hostname=10.35.19.230   Ready     8h


How reproducible:
100%

Steps to Reproduce:
1. Deploy a cluster setting the nodeIP in the nodes config

Actual results:
The nodes labels kubernetes.io/hostname and externalID are configured with the ip address.

Expected results:
The nodes labels kubernetes.io/hostname and externalID are configured with the hostname.
Comment 2 Paul Weil 2015-12-01 13:10:14 EST
*** Bug 1284614 has been marked as a duplicate of this bug. ***
Comment 3 Ravi Sankar 2016-01-11 15:19:21 EST
Fixed in https://github.com/openshift/origin/pull/6310 
This PR will be merged once we rebase kube and resolve issue https://github.com/kubernetes/kubernetes/issues/17731
Comment 4 Eric Paris 2016-01-14 08:50:53 EST
Fix was merged to origin last night. Will go ON_QA after the next OSE build.
Comment 5 Meng Bo 2016-01-15 02:17:26 EST
Verified on build 2016-01-14.1

Issue has been fixed.

After add the "nodeIP: 10.66.128.92" to node-config.yaml and start the node service. The node label and externalID will still using the hostname.

# oc get node ose-node2.bmeng.local --template {{.spec.externalID}},{{.metadata.labels}}
ose-node2.bmeng.local,map[kubernetes.io/hostname:ose-node2.bmeng.local]

Note You need to log in before you can comment on or make changes to this bug.