Bug 1719960

Summary: hammer content view version export fails.
Product: Red Hat Satellite Reporter: Suraj Patil <supatil>
Component: Hammer - ContentAssignee: Suraj Patil <supatil>
Status: CLOSED ERRATA QA Contact: Peter Dragun <pdragun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: chrobert, pcreech
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: rubygem-hammer_cli_katello-0.18.0.1-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:50:16 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 Suraj Patil 2019-06-12 19:59:21 UTC
Description of problem:
Hammer content view version export fails with the below error. 

[root@satellite]# hammer content-view version export --export-dir /var/export --id 2
tar: Cowardly refusing to create an empty archive
Try `tar --help' or `tar --usage' for more information.

Version-Release number of selected component (if applicable):
Satellite 6.5

It fails when there is no repository added in the content-view, One of the customer has published the content without any repository and was trying to export it. 

Actual results:
tar: Cowardly refusing to create an empty archive
Try `tar --help' or `tar --usage' for more information.

Expected results:
Should report that there is no repository added in the content view

Comment 3 Bryan Kearney 2019-06-24 22:08:09 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27039 has been resolved.

Comment 5 Peter Dragun 2019-07-16 11:58:22 UTC
Checked on Satellite 6.6 snap 11. Using code from comment#0 with no repository added in the content-view, ended with report:
Could not export the content view:
  Error: Ensure the content view version 'example' has at least one repository.

Comment 6 Bryan Kearney 2019-10-22 19:50:16 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, 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-2019:3172