Bug 825011 - rhui proxy config, change default to http vs https and remove trailing slash from config
rhui proxy config, change default to http vs https and remove trailing slash ...
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA (Show other bugs)
2.1
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: wes hayutin
Martin Kočí
:
Depends On:
Blocks: 834086
  Show dependency treegraph
 
Reported: 2012-05-24 16:06 EDT by wes hayutin
Modified: 2012-08-24 09:27 EDT (History)
7 users (show)

See Also:
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 07:54:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
[PATCH][grinder] normalize proxy_url and ensure it don't have extra trailing slashes (2.71 KB, patch)
2012-06-17 11:45 EDT, Satoru SATOH
no flags Details | Diff

  None (edit)
Description wes hayutin 2012-05-24 16:06:01 EDT
Description of problem:

    if 'proxy_hostname' in answers:
        args += ['yum', 'proxy_url', 'https://%s/' % answers['proxy_hostname']]
Comment 1 wes hayutin 2012-05-24 16:09:57 EDT
cloude commit 119d356eddac6185c199998a1df305c46d9cb5f6
Comment 2 wes hayutin 2012-05-24 16:10:43 EDT
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 11:45:28 EDT
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 05:45:12 EDT
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 08:13:09 EDT
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 08:22:13 EDT
Perfect, moving bug to VERIFIED then.
Comment 7 Julie 2012-08-15 15:40:59 EDT
    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 07:54:43 EDT
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

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