Red Hat Bugzilla – Bug 825011
rhui proxy config, change default to http vs https and remove trailing slash from config
Last modified: 2012-08-24 09:27:13 EDT
Description of problem:
if 'proxy_hostname' in answers:
args += ['yum', 'proxy_url', 'https://%s/' % answers['proxy_hostname']]
cloude commit 119d356eddac6185c199998a1df305c46d9cb5f6
the trailing slash also caused repo syncs to fail... should work out of the box now for repo sync.
Created attachment 592446 [details]
[PATCH][grinder] normalize proxy_url and ensure it don't have extra trailing slashes
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 \
Doctest: grinder.BaseFetch.normalize_proxy_url ... ok
Ran 1 test in 0.003s
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/
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 :)
Perfect, moving bug to VERIFIED then.
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.
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.
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.