Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yum configuration processing removes default port #36

Closed
partyzan opened this issue Nov 25, 2013 · 8 comments
Closed

Yum configuration processing removes default port #36

partyzan opened this issue Nov 25, 2013 · 8 comments

Comments

@partyzan
Copy link

The following section in the Vagrant file :

config.yum_proxy.http = "http://HOST:80"

Translates into the following entry in the yum.conf file

proxy=http://HOST

The result was no connection untill I have manually added the port to the yum.conf file.

Thanks

@tmatilai
Copy link
Owner

@partyzan oh, good catch, thanks! Sure enough I never tested using the default http port.

URI class is used for separating username and password from the specified URL. So it seems to drop the default port (which makes sense in most cases). It's a pity if Yum doesn't handle that, but let's fix this nevertheless.

Which distro and version are you using?

@johnbellone
Copy link
Contributor

I ran into this with CentOS 6.4, specifically the base box that Opscode builds. It also happens when overriding using the environment variables. The docs seem to indicate that its like this since at least CentOS 5.

@tmatilai
Copy link
Owner

@johnbellone ok, thanks. I was secretly hoping it would have been fixed in some yum version. Still it should have been fixed on vagrant-proxyconf...

I'm afraid we have to just add the port ourselves if URI won't add it. Feels dirty but it's simple anyway.

Give me a shout if anyone wants to give it a try. Otherwise I'll try to find time soonish.

@johnbellone
Copy link
Contributor

I'll put up a patch. Give me a few minutes.

@tmatilai
Copy link
Owner

@johnbellone awesome! No hurry, I won't have time to test it now anyway. =)

johnbellone pushed a commit to johnbellone/vagrant-proxyconf that referenced this issue Nov 25, 2013
I ran into this separately from issue tmatilai#36 but it boils down to two
issues:

* Implementation of URI::Generic#to_s omits the port if it equals to the
  default port value (doesn't matter scheme);
* Yum proxy requires the TCP port value irregardless of if it is the
  default port or not.

This would crop up with any software which required the TCP value to be
explicit even know sane implementations would just assume a default
value if one was omitted.
@tmatilai
Copy link
Owner

This should be fixed now in master. Thanks a lot to both of you!

@partyzan
Copy link
Author

Wow that was a quick turnaround 👍 Thanks.

@tmatilai
Copy link
Owner

tmatilai commented Dec 1, 2013

FYI, v1.0.1 including the fix has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants