Namespaces openshift-debug are not autodeleted after accessing to node terminal via OpenShift web console
Environment
- Red Hat Openshift Container Platform (RHOCP)
- 4
Issue
- Temporary namespaces
openshift-debug-xxxx, which are created when opening a terminal to the node via the OpenShift web console by navigating toCompute --> Nodes --> Select a node --> Terminal tab, are sometimes not getting auto deleted, leaving several namespaces behind.
Resolution
This is a known issue and a Request For Enhancement has been created for the Red Hat Engineering Team: Content from redhat.atlassian.net is not included.RFE-4008. The RFE has been accepted but not yet implemented, and the implementation can be tracked in Content from redhat.atlassian.net is not included.OCPSTRAT-2120.
Workaround
The openshift-debug namespaces left behind can be manually deleted. Before deleting them, ensure there are no running pods in any of the openshift-debug namespaces:
$ oc get pods -A | grep "openshift-debug"
Root Cause
When accessing to a terminal for a node via the OpenShift web console, a temporary 'openshift-debug-xxxx' namespace is created. Some times, those namespaces are not automatically deleted, depending on the way the connection to the terminal is terminated.
Diagnostic Steps
-
For reproducing the issue, open a node terminal from the OpenShift web console by going to
Compute --> Nodes --> Select a node --> Terminal tab. From the bastion host, or the machine used to runoccommands, check foropenshift-debugprojects usingocclient:$ oc get ns | grep "openshift-debug"Then, close the terminal from the console and check the status of the namespace using
occlient:$ oc get ns | grep "openshift-debug"Depending on how the connectivity to the terminal is lost, the namespace could be deleted or not.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.