Bug 1009110

Summary: katello-disconnected: should handle attempts to read an invalid manifest file gracefully.
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: Inter Satellite SyncAssignee: Mike McCune <mmccune>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-08 18:24:22 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:

Description Corey Welton 2013-09-17 17:34:43 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Corey Welton 2013-09-17 17:37:41 UTC
Bah...
Description of problem:
When user tries to provide an invalid manifest to katello-disconnected, it returns a trace.  It should return a message similar to that which is thrown when user enters a non existent file.

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


How reproducible:


Steps to Reproduce:
1. get a zip file that is not an export.
2. katello-disconnected import --manifest not_a_manifest.zip
3. View results.

Actual results:
[root@ivanova ~]# katello-disconnected import --manifest not_a_manifest.zip 
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
unzip:  cannot find or open /tmp/tmp.tEJ0FFGHwP/consumer_export.zip, /tmp/tmp.tEJ0FFGHwP/consumer_export.zip.zip or /tmp/tmp.tEJ0FFGHwP/consumer_export.zip.ZIP.
/usr/share/katello-disconnected/lib/manifest_reader.rb:318:in `read': No such file or directory - /tmp/tmp.tEJ0FFGHwP/export/meta.json (Errno::ENOENT)
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:318:in `initialize'
	from /usr/bin/katello-disconnected:312:in `new'
	from /usr/bin/katello-disconnected:312:in `import'
	from /usr/bin/katello-disconnected:405:in `<main>'


Expected results:
Validation of file and handle an invalid type gracefully, similar to what appears when user enters a filename that doesn't exist:
Provide a valid file: not_a_manifesto.zip

Additional info:

Comment 5 Bryan Kearney 2016-02-08 18:24:22 UTC
The katello-disconnected server synchronization and export functions are being moved into the Satellite server itself. With 6.2, the katello-disconnected command will no longer be delivered and instead will be replaced with a new export and import functions delivered via the UI and hammer CLI. This bug is being closed as "WONTFIX" since it relates only to the existing katello-disconnected tooling. Please check the Satellite docs with the release of Satellite 6.2 on how to use the new content export and import features.