Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 825011

Summary: rhui proxy config, change default to http vs https and remove trailing slash from config
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: wes hayutin <whayutin>
Component: RHUAAssignee: wes hayutin <whayutin>
Status: CLOSED ERRATA QA Contact: Martin Kočí <mkoci>
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.1CC: jslagle, juwu, kbidarka, mkoci, mshimura, sghai, tsanders
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
For Red Hat Update Infrastructure (RHUI) proxy configuration file, the URL default for proxy hostname needs to be changed from https to http. Trailing slash that follows the URL need to be removed because it causes repository synchronization to fail. Default is changed to http, and users will need to remove any trailing slash that is in their answers file.
Story Points: ---
Clone Of:
: 834086 (view as bug list) Environment:
Last Closed: 2012-08-24 11:54:43 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: 834086    
Attachments:
Description Flags
[PATCH][grinder] normalize proxy_url and ensure it don't have extra trailing slashes none

Description wes hayutin 2012-05-24 20:06:01 UTC
Description of problem:

    if 'proxy_hostname' in answers:
        args += ['yum', 'proxy_url', 'https://%s/' % answers['proxy_hostname']]

Comment 1 wes hayutin 2012-05-24 20:09:57 UTC
cloude commit 119d356eddac6185c199998a1df305c46d9cb5f6

Comment 2 wes hayutin 2012-05-24 20:10:43 UTC
the trailing slash also caused repo syncs to fail... should work out of the box now for repo sync.

Comment 3 Satoru SATOH 2012-06-17 15:45:28 UTC
Created attachment 592446 [details]
[PATCH][grinder] normalize proxy_url and ensure it don't have extra trailing slashes

Hi, 


I came across this problem on customer site and looked into rh-rhui-tools, 
pulp and grinder. It looks it does no bad effects for rh-rhui-tools but 
grinder looks having problem w/ it.

I dont' know how the fix you made in the commit in comment #1 looks like 
and posted my patch for grinder normalizing proxy_url and ensure it
doesn't have extra trailing slahes just in case.


BTW, i tested normalize_proxy_url like the followings:

ssato@localhost% nosetests --with-doctest -v \
> grinder-0.0.136/src/grinder/BaseFetch.py
Doctest: grinder.BaseFetch.normalize_proxy_url ... ok

----------------------------------------------------------------------
Ran 1 test in 0.003s

OK
ssato@localhost%

Comment 4 Martin Kočí 2012-08-03 09:45:12 UTC
Tested against RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso and rh-rhui-tools-2.1.7-1.el6_3.noarch. Below are my test cases and results. I just would like to ask if this is OK. Specialy if someone setup trailing slash and it is not removed in the config file. Otherwise I would move this bug to VERIFIED. 

answers.txt: proxy_server_host: koca.example.com/
pulp.conf:   proxy_url = http://koca.example.com/

answers.txt: proxy_server_host: koca.example.com
pulp.conf:   proxy_url = http://koca.example.com

These test cases below are just my playing :): 
answers.txt: proxy_server_host: https://koca.example.com/
pulp.conf:   proxy_url = http://https://koca.example.com/

answers.txt: proxy_server_host: http://koca.example.com
pulp.conf:   proxy_url = http://http://koca.example.com

answers.txt: proxy_server_host: http://koca.example.com/
pulp.conf:   proxy_url = http://http://koca.example.com/

Comment 5 wes hayutin 2012-08-03 12:13:09 UTC
In previous code we actually added the trailing slash, even if the user did not intend one to be there.  If a user decides to input a proxy url w/ a trailing slash we will not stop them :)

Some really nice testing here.. very thorough.  I think it's ok to move to verified :)

Comment 6 Martin Kočí 2012-08-03 12:22:13 UTC
Perfect, moving bug to VERIFIED then.

Comment 7 Julie 2012-08-15 19:40:59 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
For Red Hat Update Infrastructure (RHUI) proxy configuration file, the URL default for proxy hostname needs to be changed from https to http. Trailing slash that follows the URL need to be removed because it causes repository synchronization to fail. Default is changed to http, and users will need to remove any trailing slash that is in their answers file.

Comment 9 errata-xmlrpc 2012-08-24 11:54:43 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.

http://rhn.redhat.com/errata/RHEA-2012-1205.html