Bug 2054042 - [RFE] Logs in dynflow console needs more descriptive when SSH REX job fails on Satellite 7.
Summary: [RFE] Logs in dynflow console needs more descriptive when SSH REX job fails o...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.11.0
Hardware: Unspecified
OS: Unspecified
unspecified
low vote
Target Milestone: 6.12.0
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-14 05:26 UTC by Akshay Kapse
Modified: 2022-07-22 11:11 UTC (History)
3 users (show)

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:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34215 0 Normal Closed Bump ssh log level to at least error 2022-03-28 16:42:30 UTC
Red Hat Issue Tracker SAT-8297 0 None None None 2022-02-14 09:28:11 UTC

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@hostname.redhat.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


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