Bug 2065804 - Console backend check for Web Terminal Operator incorrectly returns HTTP 204
Summary: Console backend check for Web Terminal Operator incorrectly returns HTTP 204
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.8
Hardware: All
OS: All
Target Milestone: ---
: 4.11.0
Assignee: Angel Misevski
QA Contact: spathak@redhat.com
Depends On:
Blocks: 2077142
TreeView+ depends on / blocked
Reported: 2022-03-18 18:21 UTC by Angel Misevski
Modified: 2022-08-25 06:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-08-10 10:54:40 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11202 0 None open Bug 2065804: Fix Web Terminal availability check to verify operator is installed 2022-03-18 18:33:03 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:55:14 UTC

Description Angel Misevski 2022-03-18 18:21:36 UTC
Description of problem:
This is a regression coming from [1]. In enabling the OpenShift Console to search all namespaces for a Web Terminal Operator installation, the logic for checking if the operator is installed was changed from

  "Get subscriptions.operators.coreos.com 
   in namespace openshift-operators named 'web-terminal'"


  "List subscriptions.operators.coreos.com 
   in cluster named 'web-terminal'"

In the first case, the API returns "not found" if the subscription does not exist. However, in the updated check, the API will return an empty list instead. The console still checks for the "not found" response, and so misses that the list of subscriptions is empty and assumes the operator is present.

There are further checks that the console does, so in most cases the request to the `/api/terminal/available` endpoint still returns the correct result. However, if the cluster has the DevWorkspace Operator installed independently of the Web Terminal Operator [2], these further checks succeed and the Web Terminal UI button is shown incorrectly.

[1] - https://bugzilla.redhat.com/show_bug.cgi?id=2006329
[2] - Background: the DevWorkspace Operator is a dependency of the Web Terminal Operator that provides required webhooks and custom resource definitions.

Version-Release number of selected component (if applicable): 4.8, 4.9, 4.10

How reproducible: Always

Steps to Reproduce:
1. Install the DevWorkspace Operator in the cluster via OperatorHub
2. Refresh OpenShift Console web page

Actual results:
* Web Terminal button is visible in top-right ('>_').
* Browser network requests during page load returns HTTP 204 for /api/terminal/available.

Expected results:
* Console backend does not return HTTP 204 until Web Terminal Operator is installed.
* Web Terminal button is not present in UI until Web Terminal Operator is installed.

Additional info:

Comment 3 Vikram Raj 2022-04-22 12:00:22 UTC
Verified it on 4.11.0-0.nightly-2022-04-22-002610.And it works as expected.

Comment 5 errata-xmlrpc 2022-08-10 10:54:40 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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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.