Bug 1857572

Summary: tailoring-file and scap-content command of hammer downloads file with wrong filename.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: SCAP PluginAssignee: Ondřej Pražák <oprazak>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: egolov, ehelms, mhulan, oprazak, pcreech
Target Milestone: 6.8.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_foreman_openscap-0.1.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:04:18 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 Jameer Pathan 2020-07-16 07:30:35 UTC
Description of problem:
tailoring-file and scap-content command of hammer downloads file with wrong filename.

Version-Release number of selected component (if applicable):
- Satellite 6.8.0 snap 9

How reproducible:
- Always

Steps to Reproduce:
1. have some scap contents and tailoring-files
2. Run:
hammer> scap-content download --id 5 --path /tmp
hammer> tailoring-file download --id 1 --path /tmp

Actual results:
hammer> scap-content download --id 5 --path /tmp
SCAP content file downloaded, saved to: /tmp/ssg-rhel8-ds.xml"; filename*=UTF-8''ssg-rhel8-ds.xm

hammer> tailoring-file download --id 1 --path /tmp
Tailoring file downloaded, saved to: /tmp/ssg-rhel7-ds-tailoring.xml"; filename*=UTF-8''ssg-rhel7-ds-tailoring.xm

- Command downloads/saves file as "ssg-rhel7-ds-tailoring.xml"; filename*=UTF-8''ssg-rhel7-ds-tailoring.xm" instead of "ssg-rhel7-ds-tailoring.xml"
Expected results:


Additional info:

Comment 1 Brad Buckingham 2020-07-16 15:39:21 UTC
Is this a regression from 6.7?

Comment 2 Jameer Pathan 2020-07-17 07:26:40 UTC
yes, on 6.7 it works as expected.

Comment 3 Ondřej Pražák 2020-07-22 07:24:35 UTC
Created redmine issue https://projects.theforeman.org/issues/30468 from this bug

Comment 4 Bryan Kearney 2020-07-22 16:03:02 UTC
Upstream bug assigned to oprazak

Comment 5 Bryan Kearney 2020-07-22 16:03:03 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30468 has been resolved.

Comment 6 Jameer Pathan 2020-08-24 10:18:48 UTC
FailedQA

Tested with: 
- Satellite 6.8.0 snap 12

Test steps:
1. Run:
hammer> scap-content download --id 5 --path /tmp
hammer> tailoring-file download --id 1 --path /tmp

Observation:
- tailoring-file and scap-content command of hammer downloads file with wrong filename.

Comment 7 Jameer Pathan 2020-09-02 07:21:02 UTC
Verified

Verified with
- Satellite 6.8.0 snap 13

Test steps:
hammer> tailoring-file download --id 1 --path /tmp
Tailoring file downloaded, saved to: /tmp/ssg-rhel7-ds-tailoring.xml

hammer> scap-content download --id 5 --path /tmp
SCAP content file downloaded, saved to: /tmp/ssg-rhel8-ds.xml

Observation:
- tailoring-file and scap-content command downloaded scap-file with correct name.

Comment 10 errata-xmlrpc 2020-10-27 13:04:18 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.8 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-2020:4366