Bug #33242
closedRemote Execution fails to honor remote_execution_connect_by_ip override on host
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1992624
Description of problem:
When setting the global setting remote_execution_connect_by_ip to TRUE
and the host setting tor FALSE the remote execution still uses the IP
adress
Version-Release number of selected component (if applicable):
- Satellite 6.8.6
- Satellite 6.9.4
How reproducible:
- Tested via Ansible command because it gave back a proper debug log
- Set the default verbosity level to -vvv to get the same output
Steps to Reproduce:
1. Set global remote_execution_connect_by_ip setting to TRUE (yes)
2. Set parameter for host remote_execution_connect_by_ip = true (boolean)
3. Run remote command via Ansible
Actual results:
The remote execution (via Ansible) is using the IP adress:
<192.168.4.199> SSH: EXEC ssh -o ProxyCommand=none -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 192.168.4.199 '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
Expected results:
The remote command should use the dns name of the host like this:
<fluffy.example.com> SSH: EXEC ssh -o ProxyCommand=none -o StrictHostKeyChecking=no -o Port=22 -o 'IdentityFile="/usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=10 fluffy.example.com '/bin/sh -c '"'"'echo ~root && sleep 0'"'"''
Additional info:
Tested settings
Scenario | Global | Host | Status
------------------------------------------------
Scenario 1 | IP | DNS | Still uses the IP
Scenario 2 | DNS | None | Uses DNS
Scenario 3 | DNS | IP | Uses IP
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/643 added
Updated by Adam Ruzicka over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_plugin|c9d113b7b729437e52d6542f79732cfe86452008.
Updated by Adam Ruzicka over 3 years ago
- Fixed in Releases foreman_remote_execution-4.5.5 added
Updated by Adam Ruzicka over 3 years ago
- Fixed in Releases foreman_remote_execution-4.8.0 added