Bug 1839233

Summary: command line terminal pods never scale to 0
Product: OpenShift Container Platform Reporter: cvogt
Component: Dev ConsoleAssignee: cvogt
Status: CLOSED ERRATA QA Contact: Gajanan More <gamore>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.5CC: aos-bugs, nmukherj, spathak
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:41:26 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:
Embargoed:
Attachments:
Description Flags
command line terminal pods scale to 0 none

Description cvogt 2020-05-22 19:45:20 UTC
Description of problem:
Cloudshell pod never scales to zero. Therefore indefinitely consuming resources per user per terminal.

Prerequisites (if any, like setup, operators/versions):
Install the che-workspace-controller

Steps to Reproduce:
1. Open the OpenShift command line terminal
2. Wait as long as you want to and observe the pod that was created in the namespace where the workspace was created

Actual results:
Pod will be always be present.

Expected results:
After a certain amount of time (TBD) the pod should scale to 0.

Reproducibility (Always/Intermittent/Only Once):
always

Build Details:
4.5.0-0.ci-2020-05-18-204038

Additional info:
Requires https://github.com/openshift/console/pull/5332 to merge.
This PR adds support for the endpoint `/api/terminal/$namespace/$workspaceName/activity/tick`
All we need to do is POST a request to this endpoint every X seconds while the user is active in the terminal.
Suggestion: track how long it's been since the last POST request was sent. If activity occurs later than 1 minute since, then send another POST request.

Comment 3 spathak@redhat.com 2020-06-03 22:51:05 UTC
Created attachment 1694908 [details]
command line terminal pods scale to 0

Comment 4 spathak@redhat.com 2020-06-03 22:51:35 UTC
Verified on build version: 4.5.0-0.nightly-2020-06-03-105031
Browser version: firefox 73

Comment 5 errata-xmlrpc 2020-07-13 17:41:26 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.

https://access.redhat.com/errata/RHBA-2020:2409