Bug 1644593

Summary: Content View Version export breaks while exporting to relative path
Product: Red Hat Satellite Reporter: Jitendra Yejare <jyejare>
Component: Inter Satellite SyncAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Jitendra Yejare <jyejare>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: chrobert, egolov, ehelms
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://projects.theforeman.org/issues/25857
Whiteboard:
Fixed In Version: tfm-rubygem-hammer_cli_katello-0.16.0.4-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:38:26 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:
Bug Depends On:    
Bug Blocks: 1644596    

Description Jitendra Yejare 2018-10-31 08:32:08 UTC
Description of problem:
Content View Version export breaks while exporting the CVV contents to relative path folder. But works when we provide the absolute path.

Version-Release number of selected component (if applicable):
Satellite 6.5.0 snap 1

How reproducible:
Always

Steps to Reproduce:
1. Publish the CV with contents.
2. Export the CVv contents to a relative path folder.

Actual results:
The CVv export to relative path fails with the error below:
# hammer content-view version export --export-dir ExportedCV --id 2
tar: ExportedCV/export-2/export-2-repos.tar: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Expected results:
The CVv export to relative path should work or should ask the user to provide the absolute path

Additional info:
The CVv export to absolute path works.

Comment 4 Jitendra Yejare 2019-01-21 09:22:18 UTC
Verified!

@Satellite 6.5 snap 12


Steps:
1. A published CV with contents.
2. Created a new directory.
3. Exported the CVv contents to above directory with its relative path.

Logs and Behavior(as expected):

# hammer content-view version list --organization-id 301
----|-------------------------------|---------|-----------------------
ID  | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
----|-------------------------------|---------|-----------------------
401 | cvexpo_cv 1.0                 | 1.0     | Library               
399 | Default Organization View 1.0 | 1.0     | Library               
----|-------------------------------|---------|-----------------------
# mkdir abc
# hammer content-view version export --export-dir abc --id 401
# ll abc/
total 180K
-rw-r--r--. 1 root root 180K Jan 21 04:10 export-cvexpo_cv-401.tar
# tar -tvf abc/export-cvexpo_cv-401.tar 
drwxr-xr-x root/root         0 2019-01-21 04:10 export-cvexpo_cv-401/
-rw-r--r-- root/root    174080 2019-01-21 04:10 export-cvexpo_cv-401/export-cvexpo_cv-401-repos.tar
-rw-r--r-- root/root      1802 2019-01-21 04:10 export-cvexpo_cv-401/export-cvexpo_cv-401.json

Comment 6 errata-xmlrpc 2019-05-14 12:38:26 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:1222

Comment 7 Jitendra Yejare 2020-07-10 15:16:22 UTC
qe-test-coverage - : Minor bug, adds less value on automation, the export to absolute path is already been covered.