Bug 1005897 - katello-disconnected: should handle gracefully an access denied response from CDN
Summary: katello-disconnected: should handle gracefully an access denied response from...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Inter Satellite Sync
Version: Nightly
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-09 15:48 UTC by Corey Welton
Modified: 2016-02-08 18:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-08 18:23:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Welton 2013-09-09 15:48:44 UTC
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):
katello-utils-1.4.3-1.git.5.bf18eee.el6.noarch

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 17:06:21 UTC
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 18:23:18 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.


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