Bug 1005897 - katello-disconnected: should handle gracefully an access denied response from CDN
katello-disconnected: should handle gracefully an access denied response from...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Inter Satellite Sync (Show other bugs)
Unspecified Unspecified
low Severity low (vote)
: Unspecified
: --
Assigned To: Mike McCune
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-09-09 11:48 EDT by Corey Welton
Modified: 2016-02-08 13:23 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-08 13:23:18 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corey Welton 2013-09-09 11:48:44 EDT
Description of problem:
When user gets an access denied message from CDN, a trace is thrown. We catch this and return a user-friendly error.

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

How reproducible:

Steps to Reproduce:
1.  Attempt to import a manifest, possibly an old one, that for whatever reason triggers an access denied from CDN. 
2.  View results.

Actual results:
[root@ibm-x3250m4-06 ~]# katello-disconnected import --manifest old_eus_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.
Access denied to https://cdn.redhat.com/content/eus/rhel/power/5/listing
/usr/share/katello-disconnected/lib/manifest_reader.rb:72:in `block in get': Access denied to https://cdn.redhat.com/content/eus/rhel/power/5/listing (RuntimeError)
	from /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:745:in `start'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:62:in `get'
	from /usr/share/katello/app/lib/util/cdn_var_substitutor.rb:123:in `get_substitutions_from'
	from /usr/share/katello/app/lib/util/cdn_var_substitutor.rb:112:in `for_each_substitute_of_next_var'
	from /usr/share/katello/app/lib/util/cdn_var_substitutor.rb:81:in `substitute_vars_in_prefix'
	from /usr/share/katello/app/lib/util/cdn_var_substitutor.rb:57:in `substitute_vars'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:372:in `block (3 levels) in populate_repositories'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:369:in `each_value'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:369:in `block (2 levels) in populate_repositories'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:366:in `each'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:366:in `block in populate_repositories'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:356:in `each_value'
	from /usr/share/katello-disconnected/lib/manifest_reader.rb:356:in `populate_repositories'
	from /usr/bin/katello-disconnected:315:in `import'
	from /usr/bin/katello-disconnected:405:in `<main>'

Expected results:
Catch the error and indicate that the user (for whatever reason) does not appear to have access to the content on the CDN.

Additional info:
Comment 3 tony 2014-12-05 12:06:21 EST
This behavior causes UI bugs in the repo list URL (e.g. /katello/providers/redhat_provider). The 500 error page is returned instead of JSON as expected, causing JavaScript exceptions to be thrown.

While the javascript bug may need it's own bug report, it seems the behavior could be remedied by fixing this behavior so it returns the expected results.
Comment 4 Bryan Kearney 2016-02-08 13:23:18 EST
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.

Note You need to log in before you can comment on or make changes to this bug.