Bug 2023811 - Add verbose logs to (SFTP) upload feature
Summary: Add verbose logs to (SFTP) upload feature
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: ---
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Supportability QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-16 15:48 UTC by Pavel Moravec
Modified: 2023-06-27 14:12 UTC (History)
7 users (show)

Fixed In Version: sos-4.5.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-27 14:12:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 3215 0 None open [redhat] Add debugging output to failed SFTP uploads 2023-05-16 13:43:55 UTC
Red Hat Issue Tracker RHELPLAN-102945 0 None None None 2021-11-16 16:02:19 UTC

Description Pavel Moravec 2021-11-16 15:48:10 UTC
Description of problem:
--upload feature does not provide much (verbose) logging, esp. when something goes wrong (or for uploading via sftp protocol).

Let enhance that logging after some agreement when&what shall be logged but is currently missing.


Version-Release number of selected component (if applicable):
sos-4.2-2


How reproducible:
100%

Steps to Reproduce:
sos report -vvv --upload [--upload-protocol=sftp]

.. and various scenarios wrt. success/failure/cause-of-failure


Actual results:
minimal (debug) logs


Expected results:
more (debug) logs


Additional info:

Comment 2 Jake Hunsaker 2021-11-16 16:31:30 UTC
This is going to be difficult to really do well, as our (file) logging is closed by the time we get to the upload attempt:

https://github.com/sosreport/sos/blob/main/sos/report/__init__.py#L1409

We can build out some console messaging, but what specifically are you looking for more information on to report? Currently if anything in `Policy.upload_archive()` fails we raise an appropriately (hopefully, anyways) descriptive exception whose message is then printed to console.

Comment 3 Pavel Moravec 2021-11-16 17:30:37 UTC
(In reply to Jake Hunsaker from comment #2)
> This is going to be difficult to really do well, as our (file) logging is
> closed by the time we get to the upload attempt:
> 
> https://github.com/sosreport/sos/blob/main/sos/report/__init__.py#L1409

.. and that file logging must be closed as the logfile is contained in the tarball we attempt to upload.

> 
> We can build out some console messaging, but what specifically are you
> looking for more information on to report? Currently if anything in
> `Policy.upload_archive()` fails we raise an appropriately (hopefully,
> anyways) descriptive exception whose message is then printed to console.

This went out from discussion with Miroslav, raising needinfo on him when&what to more debug-log.

Comment 7 RHEL Program Management 2023-05-16 07:28:27 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 8 Pavel Moravec 2023-05-16 13:43:55 UTC
Reopening the auto-closed BZ since this is being implemented / reviewed in upstream, with soon plans to have it in RHEL downstream.

Comment 11 Pavel Moravec 2023-06-27 14:12:29 UTC
Hello,
this bug is assumed to be fixed in errata https://access.redhat.com/errata/RHBA-2023:3801 so I am closing this BZ as fixed in current release.

If you feel otherwise, please reopen the BZ and provide details what is missing.


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