Project

General

Profile

Bug #20018

REX creates zombie ssh processes when ProxyCommand is used for a tunnel

Added by Adam Ruzicka over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1461088

Description of problem:
Having local ssh configuration for ProxyCommand that contains "nc" like:

  1. 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:
  1. 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:
  1. 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:


Related issues

Copied to Foreman Remote Execution - Bug #20129: REX creates zombie ssh processes when ProxyCommand is used for a tunnelReady For Testing2017-06-14

Associated revisions

Revision 6d2f9470 (diff)
Added by Adam Ruzicka over 3 years ago

Fixes #20018 - Backport ProxyCommand patch for net-ssh

Revision aa29dbb5 (diff)
Added by Adam Ruzicka over 3 years ago

Fixes #20018 - Bump release version

History

#1 Updated by Adam Ruzicka over 3 years ago

  • Target version set to 1.14.1

I opened an issue on Github at the net-ssh project. Hopefully it will get fixed there, otherwise we'll have to reap the processes ourselves.

#2 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/256 added

#3 Updated by Adam Ruzicka over 3 years ago

  • Project changed from Foreman Remote Execution to Packaging
  • Pull request deleted (https://github.com/theforeman/foreman_remote_execution/pull/256)

Changing project to packaging because this was fixed in upstream net-ssh and we need to include the patch in our packaging.

#4 Updated by The Foreman Bot over 3 years ago

  • Pull request https://github.com/theforeman/foreman-packaging/pull/1701 added

#5 Updated by Adam Ruzicka over 3 years ago

  • Copied to Bug #20129: REX creates zombie ssh processes when ProxyCommand is used for a tunnel added

#6 Updated by Adam Ruzicka over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF