Bug 2054042

Summary: [RFE] Logs in dynflow console needs more descriptive when SSH REX job fails on Satellite 7.
Product: Red Hat Satellite Reporter: Akshay Kapse <akapse>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: ahumbe, aruzicka, lstejska
Target Milestone: 6.12.0Keywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-smart_proxy_remote_execution_ssh-0.5.2, tfm-rubygem-smart_proxy_dynflow-0.6.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:33:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Akshay Kapse 2022-02-14 05:26:40 UTC
Description of problem:
- SSH REX job fails on Satellite 7.
- Logs in dynflow console shows StandardError
- After debugging observed that foreman public keys were not copied but error logs haven't pointed it out.

Version-Release number of selected component (if applicable):
- satellite-7.0.0-0.5.beta.el7sat.noarch

How reproducible:

- Easily.

Steps to Reproduce:

1. Register a host to the Satellite.
2. Run the REX ssh commands job.

Actual results:

~~~
Error:
StandardError
Job execution failed 
~~~


Expected results:
- Logs should point to the proper error description.

Comment 1 Adam Ruzicka 2022-02-14 09:10:26 UTC
This is already fixed in tfm-rubygem-smart_proxy_remote_execution_ssh-0.5.2 which should be available starting with snap 9.

Comment 3 Peter Ondrejka 2022-02-14 15:33:11 UTC
Verified that ssh log level has been bumped on Satellite 7.0 snap 9. In the case of missing keys, the proxy.log says:

2022-02-14T10:17:46  [E] error while initializing command RuntimeError Unable to create directory on remote system /var/tmp/foreman-ssh-cmd-9b4d94fe-87fe-40c6-a15a-bdd5786ae2ef: exit code: 255
 root.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

That points to the issue. But the original request was about the dynflow console, which in this case still reports the generic "StandardError: Job execution failed", so I'm wondering if more can be done there.

Comment 4 Adam Ruzicka 2022-02-14 15:55:39 UTC
Not really, no. Dynflow console gives access to low-level information and should be only used if the primary means (ie host output) give no hint towards what's going on. It isn't meant to be consumed by users directly

Comment 5 Adam Ruzicka 2022-02-17 13:34:59 UTC
Otoh, on snap 9 it is not visible in host's output, that should be fixed with smart_proxy_dynflow-0.6.2 and then #4 will finally apply.

Comment 9 Peter Ondrejka 2022-07-22 11:11:33 UTC
verified on Satellite 6.12 sn 3, the default ssh log level has been increased

Comment 13 errata-xmlrpc 2022-11-16 13:33:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506