Bug 2125497

Summary: upload-dir option ignored with sftp
Product: Red Hat Enterprise Linux 9 Reporter: Pavel Moravec <pmoravec>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav HradĂ­lek <mhradile>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: agk, bmr, mhradile, plambri, sbradley, theute
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sos-4.4-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-03-16 21:39:53 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 2022-09-09 08:01:00 UTC
This bug was initially created as a copy of Bug #2063259

I am copying this bug because: 

we need to have 8.8 and 9.2 in par


Description of problem:
Help does not mention that --upload-dir is not used with sftp protocol. The option was mainly included for better control over ftp uploads.

Version-Release number of selected component (if applicable):
sos-4.2-15.el8.noarch (unreleased)

How reproducible:
100%

Steps to Reproduce:
1. sos report --help | grep upload
2. sos report -o host --upload --upload-protocol=sftp --upload-directory users/internal_user --case-id 03093474 --upload-user internal_user

Actual results:
Help mentions --upload-dir option but it is not used with sftp protocol.
Upload fails.

Expected results:
a) Help should mention that sftp protocol is a special case where --upload-dir is not used.
b) Or it should work (obviously correctly cause server error when used incorrectly).

Additional info:
I thought that specifying correct path manually could be used as a workaround for uploading via internal user accounts (does not work normally). But it did not help for some reason, likely --upload-dir not being included.

Comment 3 Pavel Moravec 2023-03-16 21:39:53 UTC
Closing the bugzilla as the fix has been delivered in sos-4.5.0-1.el9 released via https://access.redhat.com/errata/RHBA-2023:1301 errata.