Bug 1461088 - REX creates zombie ssh processes when ProxyCommand is used for a tunnel (Satellite 6.3)
REX creates zombie ssh processes when ProxyCommand is used for a tunnel (Sate...
Status: ON_QA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution (Show other bugs)
6.2.10
x86_64 Linux
medium Severity medium (vote)
: GA
: --
Assigned To: aruzicka
Lukas Pramuk
: Triaged
Depends On:
Blocks: 1465787 1485297
  Show dependency treegraph
 
Reported: 2017-06-13 09:28 EDT by Pavel Moravec
Modified: 2017-08-25 06:23 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1465787 1485297 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 20018 None None None 2017-06-14 07:51 EDT

  None (edit)
Description Pavel Moravec 2017-06-13 09:28:41 EDT
Description of problem:
Having local ssh configuration for ProxyCommand that contains "nc" like:

# cat /usr/share/foreman-proxy/.ssh/config
Host proxyserver
ProxyCommand

Host *
ProxyCommand ssh -q -i /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy proxyrex@proxyserver nc %h %p
#

then invoking and REX job leaves one ssh zombie proces.

smart_proxy_dynflow_core service must be restarted to clean the ssh defunct processes


Version-Release number of selected component (if applicable):
Sat 6.2.9


How reproducible:
100%


Steps to Reproduce:
1. Have above-like ssh config
2. Run a REX job - it can fail or succeed, it doesnt matter. Even it can fail due to wrongly set .ssh/config, that does not matter either.
3. Check ssh processes on the Satellite/Capsule that invoked the ssh commands


Actual results:
# ps aux | grep defunct
foreman+ 24776  0.0  0.0      0     0 ?        Z    13:06   0:00 [ssh] <defunct>
foreman+ 24848  0.0  0.0      0     0 ?        Z    13:07   0:00 [ssh] <defunct>
root     24856  0.0  0.0 112652   964 pts/0    S+   13:07   0:00 grep --color=auto defunct
# 

(each REX job adds one such defunct process)


Expected results:
# ps aux | grep defunct
root     24856  0.0  0.0 112652   964 pts/0    S+   13:07   0:00 grep --color=auto defunct
#


Additional info:
Comment 2 Carlos Peón 2017-06-13 09:56:17 EDT
Also tested without nc:

ProxyCommand ssh -q -i /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy proxyrex@proxyserver -W %h:%p

and same results.
Comment 3 aruzicka 2017-06-14 07:51:26 EDT
Created redmine issue http://projects.theforeman.org/issues/20018 from this bug
Comment 4 pm-sat@redhat.com 2017-06-19 08:05:38 EDT
Upstream bug assigned to aruzicka@redhat.com
Comment 5 pm-sat@redhat.com 2017-06-19 08:05:41 EDT
Upstream bug assigned to aruzicka@redhat.com

Note You need to log in before you can comment on or make changes to this bug.