This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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.
Bug 2173155 - REX jobs through jump hosts are failing as ProxyCommand=none is hard coded
Summary: REX jobs through jump hosts are failing as ProxyCommand=none is hard coded
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.12.1
Hardware: All
OS: All
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-24 10:38 UTC by Nagoor Shaik
Modified: 2024-06-06 16:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-06-06 16:09:11 UTC
Target Upstream Version:
Embargoed:
nshaik: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   SAT-18399 0 None Migrated None 2024-06-06 16:09:10 UTC

Description Nagoor Shaik 2023-02-24 10:38:13 UTC
Description of problem:
Remote Execution jobs are failing when triggered actions goes through the jump host/bastion server.

Satellite ----> Jump Host/Bastion Server ---> Client

Even after configuring correct ssh parameters under ~foreman-proxy/.ssh/config REX jobs fails because the ProxyCommand=none is hard coded as per https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/89

Version-Release number of selected component (if applicable):
Satellite 6.12+

How reproducible:
100%

Steps to Reproduce:
1. Install Satellite 6.12
2. Register a client behind a NATed network (Ensure the only way to reach the host from Satellite is through a Jump Host)
3. Configure Jump Host configuration as below 

 # vi ~foreman-proxy/.ssh/config
Host bastion.example.com
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  IdentityFile ~foreman-proxy/.ssh/id_rsa_foreman_proxy

Host * !bastion.example.com
  StrictHostKeyChecking no
  UserKnownHostsFile /dev/null
  IdentityFile ~foreman-proxy/.ssh/id_rsa_foreman_proxy
  ProxyJump root.com

4. Ensure foreman-proxy SSH pub keys are copied to both bastion and client
5. Execute a simple REX job which fails with below error

~~~
1: Error initializing command: RuntimeError - Failed to establish connection to remote host, exit code: 255
2: Exit status: EXCEPTION
~~~

Actual results:
REX job fails

Expected results:
REX job should succeed and ProxyCommand argument shouldn't be hard-coded 

Additional info:
IMO, we need to revert this change https://github.com/theforeman/smart_proxy_remote_execution_ssh/pull/89

and this bug https://bugzilla.redhat.com/show_bug.cgi?id=2108637 can easily be addressed by just opening a documentation to include a switch `--no-ssh` argument with the ipa-client-install command.

Comment 1 Adam Ruzicka 2023-02-28 10:27:03 UTC
If I enroll a machine with ipa-client-install and later rerun it as ipa-client-install --no-ssh, will it fix things or does the argument need to be passed the first time the machine is enrolled?

Comment 2 Nagoor Shaik 2023-03-01 08:47:46 UTC
Unfortunately no, its not possible. It has to be passed in for the first time. In case a user has not configured it with --no-ssh option, then they have to run the ipa-client-install --uninstall first before re-running the "ipa-client-install --no-ssh" again.

See https://bugzilla.redhat.com/show_bug.cgi?id=1544379#c7

Comment 3 Adam Ruzicka 2023-03-01 12:23:08 UTC
That doesn't sound like a good user experience. Would having ssh options configurable the same way as we do for ansible be acceptable?

Comment 4 Nagoor Shaik 2023-03-02 04:27:11 UTC
Yes, that looks good plan. But, I strongly feel that --no-ssh is better option for Satellite 6, because it has to be executed just on the Satellite/Capsules which doesn't involve too much effort for the end-user.

Even if the customer has executed ipa-client-install without this option, they can just uninstall and then use the --no-ssh option which wouldn't cause any major outage and also it is common practice in IDM world as its recommended in https://bugzilla.redhat.com/show_bug.cgi?id=1544379#c7

Comment 6 Ben 2023-06-06 07:52:20 UTC
Just for reference, I've been fixing this for my own <= 6.12.2 (and now 6.13.1) install by commenting out the line

ssh_options << "-o ProxyCommand=none"

in file 

/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.10.1/lib/smart_proxy_remote_execution_ssh/multiplexed_ssh_connection.rb 

(previously under 6.12.2 it was in 

/usr/share/gems/gems/smart_proxy_remote_execution_ssh-0.7.3/lib/smart_proxy_remote_execution_ssh/runners/script_runner.rb)

I'd love not to have to do so as it messes up "satellite-maintain upgrade check" runs (-:

Comment 9 Eric Helms 2024-06-06 16:09:11 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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