Bug 2023811

Summary: Add verbose logs to (SFTP) upload feature
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED CURRENTRELEASE QA Contact: Supportability QE <supportability-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: agk, bmr, mhradile, plambri, sbradley, theute, upgrades-and-supportability
Target Milestone: rcKeywords: FutureFeature, Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sos-4.5.4-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 14:12:29 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 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.