Bug 1881953

Summary: Console Node Terminal can fail if there is a cluster-wide node selector
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Robb Hamilton <rhamilto>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.zCC: aos-bugs, jokerman, wking, yanpzhan
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: `oc debug` was updated with https://bugzilla.redhat.com/show_bug.cgi?id=1812813 to create a new debug project with an empty node selector in order to work around a problem where `oc debug` only works against worker nodes. Consequence: The web console avoided this problem by asking users to choose a namespace when visiting the Node > Terminal page before the terminal is opened, resulting in inconsistency in the user experience compared to `oc`. Fix: The web console now creates a a new debug project with an empty node selector upon visiting the Node > Terminal page. Result: The behavior of the web console Node > Terminal page now aligns with the behavior of `oc debug`.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:44:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 Yanping Zhang 2020-09-30 07:52:02 UTC
Checked on ocp 4.6 cluster with payload 4.6.0-0.nightly-2020-09-29-170625.

1. Go to one master node's terminal tab. in terminal, input chroot /host, the page works well
check project, there is a new project: openshift-debug-node-vj82j, check the project yaml, there is openshift.io/node-selector: "" annotation.
2. Add label to one work node, then the node becomes a infra node.
$ oc label node ip-10-0-152-63.ap-south-1.compute.internal node-role.kubernetes.io/infra=
node/ip-10-0-152-63.ap-south-1.compute.internal labeled
$ oc get node ip-10-0-152-63.ap-south-1.compute.internal
NAME                                         STATUS   ROLES          AGE    VERSION
ip-10-0-152-63.ap-south-1.compute.internal   Ready    infra,worker   7h1m   v1.19.0+bafba66
Go to the node's terminal tab, in terminal, input chroot /host, the page works well, and there is a new project "openshift-debug-node-lmgl5" generated, check the project yaml, there is openshift.io/node-selector: "" annotation.
3.Go to one work node's terminal tab, in terminal, input chroot /host, the page works well
check project, there is a new project: openshift-debug-node-9xnnn, check the project yaml, there is openshift.io/node-selector: "" annotation.

Have the defaultNodeSelector set to defaultNodeSelector: type=foo,region=foo in scheduler cluster by "oc edit schedulers.config.openshift.io cluster", then repeat step 1,2,3 again. All work well.
The bug is fixed.

Comment 5 errata-xmlrpc 2020-10-27 16:44:57 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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196