Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1128296

Summary: Content sync should not silently hang/fail due do to possibly malformed proxy url
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Corey Welton <cwelton>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.5CC: achan, bbuckingham, bkearney, chrobert, jcallaha, jmontleo, shughes, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/7943
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When synchronizing content, the User Interface fails to complete the synchronization process and hangs indefinitely, despite the pulp logs registering errors. This error was caused by an incomplete URL. All URL parameters must contain thefull address and requires the "http" or "https" protocol. Prevalidation checks have been implemented to check the proxy URL and provide an error message should the proxy URL fail to comply with the requirements.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-16 21:07:40 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: 1115190    

Description Corey Welton 2014-08-08 20:09:54 UTC
Description of problem:

I *think* this is what the issue is.

Doing an install and passing proxy host/port flags with a malformed proxy url (i.e., no 'http://'), attempts to sync never time out and never throw errors.  Pulp logs blow up all over the place, however.


Version-Release number of selected component (if applicable):
Satellite-6.0.4-RHEL-6-20140806.0

How reproducible:


Steps to Reproduce:
1.  perform a katello-install with flags akin to the following:
--katello-proxy-url myproxy.example.com --katello-proxy-port 3128  
(please note any lacking "http://" prefix)
2.  Attempt syncing RH and/or custom content
3.  Wait...and wait... and wait...
4.  View pulp logs

Actual results:

UI just sits forever, but pulp logs appear to tell us there's an error

Aug  8 15:09:42 beast pulp: pulp_rpm.plugins.importers.yum.sync:INFO: Downloading metadata from http://satellite6.lab.eng.rdu2.redhat.com/devel/candidate-trees/Satellite/Satellite-6.0.4-RHEL-6-20140806.0/compose/rhcommon/x86_64/os/.
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Unhandled Exception in Worker Thread [139847057159936]
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Traceback (most recent call last):
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 92, in worker
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     session = build_session(self.config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 294, in build_session
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     _add_proxy(session, config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 325, in _add_proxy
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     url = ':'.join((host, str(config.proxy_port)))
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: TypeError: sequence item 0: expected string, NoneType found
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Unhandled Exception in Worker Thread [139847046670080]
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Traceback (most recent call last):
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 92, in worker
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     session = build_session(self.config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 294, in build_session
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     _add_proxy(session, config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 325, in _add_proxy
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     url = ':'.join((host, str(config.proxy_port)))
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: TypeError: sequence item 0: expected string, NoneType found
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Unhandled Exception in Worker Thread [139847057159936]
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Traceback (most recent call last):
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 92, in worker
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     session = build_session(self.config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 294, in build_session
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     _add_proxy(session, config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 325, in _add_proxy
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     url = ':'.join((host, str(config.proxy_port)))
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: TypeError: sequence item 0: expected string, NoneType found
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Unhandled Exception in Worker Thread [139847046670080]
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Traceback (most recent call last):
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 92, in worker
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     session = build_session(self.config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 294, in build_session
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     _add_proxy(session, config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 325, in _add_proxy
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     url = ':'.join((host, str(config.proxy_port)))
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: TypeError: sequence item 0: expected string, NoneType found
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Unhandled Exception in Worker Thread [139847057159936]
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: Traceback (most recent call last):
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 92, in worker
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     session = build_session(self.config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 294, in build_session
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     _add_proxy(session, config)
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:   File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 325, in _add_proxy
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR:     url = ':'.join((host, str(config.proxy_port)))
Aug  8 15:09:42 beast pulp: nectar.downloaders.threaded:ERROR: TypeError: sequence item 0: expected string, NoneType found

Expected results:
* Pulp errors need to bubble up
* We need to time out appropriately
* Perhaps we should better handle/test proxy urls at install and/or during syncs or what have you?

Additional info:

Comment 2 Corey Welton 2014-08-08 20:54:05 UTC
TBH I am not sure if it is the installer or the workers themselves just hanging ... even a service restart seems to be sitting for a long time on workers.... presumably when sync tasks are still waiting in dynflow...

celery multi v3.1.11 (Cipater)
> Stopping nodes...
        > reserved_resource_worker-1.lab.bos.redhat.com: TERM -> 27359
        > reserved_resource_worker-3.lab.bos.redhat.com: TERM -> 27405
        > reserved_resource_worker-2.lab.bos.redhat.com: TERM -> 27382
        > reserved_resource_worker-0.lab.bos.redhat.com: TERM -> 27340
> Waiting for 4 nodes -> 27359, 27405, 27382, 27340...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Comment 5 Justin Sherrill 2014-10-14 19:31:44 UTC
Created redmine issue http://projects.theforeman.org/issues/7943 from this bug

Comment 6 Bryan Kearney 2014-10-17 00:03:34 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/7943 has been closed
-------------
Justin Sherrill
Applied in changeset commit:katello-installer|873174fbc9e13d065c4502a75ebb320e8053a385.

Comment 9 Mike McCune 2014-12-11 17:24:32 UTC
temp move to MOD for ET

Comment 11 jcallaha 2015-01-09 16:37:17 UTC
*** QE verified for z-stream ***

New error message encountered when passing a malformed proxy URL:
--katello-proxy-url must be a full URI and only supports http or https (e.g. http://proxy.example.com)

Comment 13 errata-xmlrpc 2015-01-16 21:07:40 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/RHBA-2015:0054