Bug 1838768

Summary: Node terminal should use the current namespace when set
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.5CC: aos-bugs, jhadvig, jokerman, pweil, rhamilto, yapei
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Version: 4.5.0-0.ci-2020-05-21-034945 Cluster ID: ee8f2548-7f26-4883-a8c9-352faa8e7f68 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0
Last Closed: 2020-10-27 16:00:29 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:
Attachments:
Description Flags
After User Selects Namespace for debug pod none

Description Samuel Padgett 2020-05-21 18:35:33 UTC
The node terminal should use the currently selected namespace in console (if one is selected). Today it always is put in the `default` project.

Note that the Node page is not a namespaced page, but console should still be tracking an active namespace in Redux.

Comment 2 Robb Hamilton 2020-05-26 13:45:47 UTC
Sam and I discussed this and determined the best solution is to probably allow the user to select a namespace for the debug pod as the user will otherwise be unintentionally creating debug pods in whatever the console's active namespace is since 4.x does not display the namespace picker for nodes.

Comment 4 Robb Hamilton 2020-06-17 18:47:36 UTC
PR opened, awaiting approval.

Comment 7 Yadan Pei 2020-06-29 06:59:06 UTC
Created attachment 1699079 [details]
After User Selects Namespace for debug pod

Hi Robb,

Now before opening Terminal for a node, user will be asked to select a namespace for debug pod, after he choose a namespace, the namespace selector will disappear. Why not always show the selected namespace? Since after the project selector disappear, user may forgot which namespace the debug pod is in. This is checked against     4.6.0-0.nightly-2020-06-26-035408


Assigning back for confirmation

Comment 8 Robb Hamilton 2020-06-29 12:05:17 UTC
(In reply to Yadan Pei from comment #7)

> Now before opening Terminal for a node, user will be asked to select a
> namespace for debug pod, after he choose a namespace, the namespace selector
> will disappear. Why not always show the selected namespace? Since after the
> project selector disappear, user may forgot which namespace the debug pod is
> in. 

Prior to this change, the debug pod for the Nodes Terminal tab was always being created in the `default` namespace.  Adding the namespace picker forces the user to choose a namespace for the debug pod each time the Terminal tab is visited.  Note the debug pod is deleted once the user leaves the Terminal tab regardless of namespace.  The intention with adding the picker is to make the user aware the debug pod is being created as a result of visiting the Terminal tab so they aren't surprised to see an additional pod running on the cluster.  Leaving the picker would help serve as a visual cue which namespace the debug pod was created in, but it's not of great importance since the namespace the debug pod can be created anywhere.  Reloading/revisiting the tab deletes an existing debug pod and forces the user to choose the namespace again, so doing so would be one way to account for a "mistake" in namespace selection.  In other words, leaving the namespace picker present could encourage changes to the namespace that aren't really necessary?

The CLI uses the active project/namespace for this purpose since you're always within the context of a project.  We couldn't do that in the console because Nodes pages do not have the namespace selector present.

Comment 9 Yadan Pei 2020-06-30 01:15:24 UTC
Thank you Robb for you detail explanation, it sounds good to me. Moving to VERIFIED

Comment 11 errata-xmlrpc 2020-10-27 16:00:29 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