Project

General

Profile

Actions

Bug #25481

closed

Foreman fails to execute ansible commands when connected to ipa server

Added by Marek Hulán over 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
-

Description

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

Description of problem:
Whne Satellite 6.4 is connected to an IPA server it fails to run Ansible commands on client systems

Version-Release number of selected component (if applicable):
- Satellite 6.4.0
- ansible-2.7.0-1.el7ae.noarch

How reproducible:
Everytime the Satellite is configured as an ipa client

Steps to Reproduce:
1. Install Satellite 6.4.0
2. Connect Satellite to IPA server
3. Try to run an Ansible command on a command on a client

Actual results:
The run fails with:
fatal: [fluffy.example.com]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh_exchange_identification: Connection closed by remote host\r\n", "unreachable": true}

Expected results:
The run should work

Additional info:
The ipa client changes the file /etc/ssh/ssh_config when it is configured and adds the line

ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h

This was already reported for ovirt/RHV in this bugzillas:
- https://bugzilla.redhat.com/show_bug.cgi?id=1529851#c14
- https://bugzilla.redhat.com/show_bug.cgi?id=1531967#c5

Workaround:
Comment the line in /etc/ssh/ssh_config like this:

#ProxyCommand /usr/bin/sss_ssh_knownhostsproxy -p %p %h

and the Ansible jobs are working again.


Related issues 1 (0 open1 closed)

Related to Installer - Bug #28559: Hardcoding Proxy Command breaks running Ansible on DebianClosedMarek HulánActions
Actions #1

Updated by Tomer Brisker over 5 years ago

  • Project changed from Ansible to Installer
  • Subject changed from Satellite fails to execute ansible commands when connected to ipa server to Satellite fails to execute ansible commands when connected to ipa server
  • Category set to Foreman modules
Actions #2

Updated by Tomer Brisker over 5 years ago

  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/485 added
Actions #3

Updated by Tomer Brisker over 5 years ago

  • Status changed from New to Ready For Testing
Actions #4

Updated by Ohad Levy over 5 years ago

  • Subject changed from Satellite fails to execute ansible commands when connected to ipa server to Foreman fails to execute ansible commands when connected to ipa server
Actions #5

Updated by The Foreman Bot almost 5 years ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/511 added
Actions #6

Updated by The Foreman Bot almost 5 years ago

  • Fixed in Releases 1.23.0 added
Actions #7

Updated by Ewoud Kohl van Wijngaarden almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by The Foreman Bot over 4 years ago

  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/534 added
Actions #9

Updated by Ewoud Kohl van Wijngaarden over 4 years ago

  • Triaged changed from No to Yes
  • Fixed in Releases 1.22.1 added
Actions #10

Updated by Marek Hulán over 4 years ago

This causes a problem on my debian environment when ansible setup module is ran, for some reasons `ssh_args=` (even empty) changes the behavior. Reproduced with ansible 2.8, when running under foreman-proxy user only (root seems to work fine), it seems like sftp/scp/pipe (dd over ssh) does not work, therefore setup fails.

When I commented this line, it started working again but I had to also change owner of /var/lib/foreman-proxy/ansible/ to foreman-proxy on debian (packaging issue?)

Actions #11

Updated by Marek Hulán over 4 years ago

If I specify also ansible defaults as per https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-ssh-args (-C -o ControlMaster=auto -o ControlPersist=60s) it works, so some of these options are probably necessary and by hardcoding ssh_args to ProxyCommand=none we're breaking it

Actions #12

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Related to Bug #28559: Hardcoding Proxy Command breaks running Ansible on Debian added
Actions

Also available in: Atom PDF