Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Requesting backport of https://github.com/docker/docker/pull/27470 to docker 1.12 so we can plumb through the functionality needed to kill exec'ed processes in the container in OpenShift.
+++ This bug was initially created as a clone of Bug #1392034 +++
Description of problem:
Each time a terminal connection is opened through the web console, a /bin/sh session is left behind in the pod. These connections build up over time and do not appear to terminate.
Version-Release number of selected component (if applicable):
v3.3.0.32
How reproducible:
100%
Steps to Reproduce:
1. Navigate to the Terminal tab of a pod
2. At the prompt enter: $ ps faux
3. Count the number of /bin/sh instances
4. Reload the browser page
5. Navigate again to the Terminal tab the pod
6. Run ps again: $ ps faux
7. Note that the number of /bin/sh instances have increased by 1
Actual results:
/bin/sh instances increase each time the web console establish a new Terminal connection.
Expected results:
Some mechanism to ensure these /bin/sh instances do not build up over time.
Additional info:
--- Additional comment from Andy Goldstein on 2016-11-04 12:23:58 EDT ---
Blocked until https://github.com/docker/docker/pull/27470 is in a version of docker we have access to *and* we've updated kube/openshift to use this new docker feature.
--- Additional comment from Justin Pierce on 2016-11-04 14:17:20 EDT ---
Perhaps you have considered it already, but if all you need is the pid, why not use the exec websocket to emulate stdout < echo "THIS IS THE SH PID($$)" ?
You could await a line with that pattern and extract the PID. The web console user would not need to see this output line.
--- Additional comment from Andy Goldstein on 2016-11-04 14:19:37 EDT ---
There is no mechanism for an external client such as the web console to send a "kill pid <x>" request. This has to be managed by the component responsible for spawning the exec session, which is currently the node.
--- Additional comment from Justin Pierce on 2016-11-04 14:51:35 EDT ---
Just so I'm clear, why wouldn't another exec API call do the job? ...exec?command=kill&command=-9&command=[pid]&...
This appears to work in my environment.
--- Additional comment from Andy Goldstein on 2016-11-04 14:55:59 EDT ---
Yes, you could do that, but you shouldn't have to.
--- Additional comment from Jessica Forrester on 2016-12-07 16:38:18 EST ---
Andy is there anything the UI will actually need to do for this or is kube going to handle killing the PID that was launched for the exec when the exec closes? Should I just transfer this bug to you guys?
--- Additional comment from Andy Goldstein on 2016-12-07 16:40:24 EST ---
Yeah, I would send this to Derek's team.
--- Additional comment from Seth Jennings on 2017-01-04 14:14:48 EST ---
FYI https://github.com/docker/docker/pull/27470 has merged targeted for docker 1.13.
--- Additional comment from Derek Carr on 2017-01-18 10:57:00 EST ---
marked upcoming release as we wait for docker 1.13
--- Additional comment from Seth Jennings on 2017-03-09 14:44:27 EST ---
still waiting on docker 1.13
We have docker-latest at 1.13 in rhel7.3.4, the question is will OpenSHift/k8s be able to run on docker-1.13 by default in rhel7.3.5? Or do you want us to back port this fix if possible to docker-1.12?
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-2017:2599