Bug 1525342 - oc get node show "<none>" role
Summary: oc get node show "<none>" role
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.10.0
Assignee: Scott Dodson
QA Contact: Weihua Meng
Depends On:
TreeView+ depends on / blocked
Reported: 2017-12-13 05:49 UTC by Wang Haoran
Modified: 2018-10-12 03:21 UTC (History)
9 users (show)

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.
Clone Of:
Last Closed: 2018-07-30 19:09:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:09:46 UTC
Red Hat Bugzilla 1535673 None CLOSED Need to mark masters schedulable 2019-11-04 13:44:46 UTC

Internal Links: 1535673

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:
Steps to Reproduce:

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

[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.


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