Bug #34368
closedREX doesn't honor effective_user when async_ssh is true
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2048560
Description of problem:
When option async_ssh is true and remote_execution_ssh_user is not root, the resulting job is not executed with the effective_user on the target server
Version-Release number of selected component (if applicable):
satellite 6.10.2
How reproducible:
always
Steps to Reproduce:
1. Configure async_ssh to true:
- grep async /etc/foreman-proxy/settings.d/remote_execution_ssh.yml
- Whether to run remote execution jobs asynchronously
:async_ssh: true
~~~
2. Configure remote_execution_ssh_user to a regular user and define remote_execution_effective_user_method to sudo
3. Initiate a job to run "whoami" on a target host. Check the output of the job and you'll see the regular user, instead of root.
4. Change the async_ssh back to false, and run the same job again. You'll see root on the output.
Actual results:
job is execute with the regular user.
Expected results:
job to be executed with root
Additional info: