Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1525342

Summary: oc get node show "<none>" role
Product: OpenShift Container Platform Reporter: Wang Haoran <haowang>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED ERRATA QA Contact: Weihua Meng <wmeng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.8.0CC: aos-bugs, ccoleman, dapark, dmoessne, jokerman, mmccomas, vrutkovs, wmeng, xtian
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Because nodes are now labeled with node-role.kubernetes.io/$role=true when listing nodes via `oc get nodes` you will not see the roles associated with a given node. Common node roles being `master` `compute` or `infra`. A node may be assigned multiple roles.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:09:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wang Haoran 2017-12-13 05:49:58 UTC
Description of problem:

When run oc get node on the master, the ROLES colume shows none.

oc get node
NAME                            STATUS                     ROLES     AGE       VERSION
ip-172-18-15-136.ec2.internal   Ready                      <none>    7h        v1.8.1+0d5291

the "ROLES" colum are generated by the node label "kubernetes.io/role", see the code

We need add a default label for the node, master, so we can list the correct role when we run "oc get node", we can workround by set "openshift_node_labels" param in the inventory file, but in my mind, this label should be a default value.

Version-Release number of the following components:
master branch
How reproducible:
always
Steps to Reproduce:
1.
2.
3.

Actual results:
Please include the entire output from the last TASK line through the end of output if an error is generated

Expected results:

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Scott Dodson 2018-01-24 15:14:40 UTC
This is a 3.10 blocker as we intend to make use of this new labeling there but it shouldn't block any functionality in 3.9.

Comment 2 Clayton Coleman 2018-03-26 03:30:45 UTC
This is mostly fixed in my 3.10 changes.  I plan to change the default node selectors for router / registry / logging / metrics / prometheus to target node-role.kubernetes.io/infra=true, and to indicate during install and upgrade the default value has changed and that playbook inventories should use the new role info.

Comment 3 Scott Dodson 2018-04-16 15:09:33 UTC
Should be fixed in 3.10 master branch now.

Comment 4 Weihua Meng 2018-04-17 11:28:24 UTC
Fixed.
openshift-ansible-3.10.0-0.21.0.git.0.0b1d180.el7.noarch.rpm

[root@qe-wmeng21-master-etcd-1 ~]# oc get nodes
NAME                                STATUS    ROLES     AGE       VERSION
qe-wmeng21-master-etcd-1            Ready     master    12h       v1.10.0+b81c8f8
qe-wmeng21-node-registry-router-1   Ready     compute   12h       v1.10.0+b81c8f8
qe-wmeng21-node-registry-router-2   Ready     compute   12h       v1.10.0+b81c8f8
[root@qe-wmeng21-master-etcd-1 ~]#

Comment 6 errata-xmlrpc 2018-07-30 19:09:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1816