Bug 1011972
Summary: | proxy host setting ignored | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Everhard Faas <everhard.faas> |
Component: | async/tasks | Assignee: | Jeff Ortel <jortel> |
Status: | CLOSED DUPLICATE | QA Contact: | pulp-qe-list |
Severity: | low | Docs Contact: | |
Priority: | high | ||
Version: | 2.2 | CC: | jconnor, martijn, mhrivnak, pthomas, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | 2.2.0 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-10-09 20:52:37 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: |
Description
Everhard Faas
2013-09-25 13:20:33 UTC
The bug is a semantic one, the --proxy-host requires the scheme (ie http:// or https://) True, the documentation also mentions to include the scheme. But, when specifying the proxy with the scheme the results are somewhat the same:\ # Adding a repo: pulp-admin rpm repo create \ --repo-id=rhel-6-server --retain-old-count=1 \ --serve-http=true --serve-https=false \ --feed=https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/os \ --feed-ca-cert=/etc/rhsm/ca/redhat-uep.pem \ --feed-key=/etc/pki/entitlement/xxx.pem \ --feed-cert=/etc/pki/entitlement/yyy.pem \ --proxy-host=http://www-proxy.dev.example.com --proxy-port=8082 \ --relative-url=rhel-6-server --max-downloads=4 # Results of running a sync in pulp.log 2013-09-24 10:02:47,181 nectar.downloaders.threaded:ERROR: [Errno -2] Name or service not known Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/nectar/downloaders/threaded.py", line 160, in _fetch response = session.get(request.url, headers=headers) File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 310, in get return self.request('GET', url, **kwargs) File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 279, in request resp = self.send(prep, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 374, in send r = adapter.send(request, **kwargs) File "/usr/lib/python2.6/site-packages/requests/adapters.py", line 206, in send raise ConnectionError(sockerr) ConnectionError: [Errno -2] Name or service not known Maybe it is worth to mention that no DNS resolving of Internet-hosts can be done on the local network. Only the proxyhost can. Eg., "cdn.redhat.com" cannot be resolved by the pulp node, but can be resolved (and reached) by the proxyhost. A similar host on the same network running pulp 2.1 works as supposed, with the difference that on pulp 2.1 the switch --proxy-url is used (changed with pulp2.2). Rgrds, Martijn I suggest the severity and priority can be upped with information from the previous comment? Rgrds, Martijn bumping this to high priority on 2.3 so we can at least try reproducing it locally. Did another setup with pulp 2.2 and a squid http-proxy. Proxy support seems definitely broken in pulp 2.2. I got it to work by patching 'threaded.py' with the patch below. This makes it possible to use a proxy-host (/w scheme suffix) .. downside is that it only works with feeds over http. Feeds over https respond with a "bad request". --- threaded.py 2013-09-27 19:58:37.922115101 +0000 +++ threaded.py.me 2013-09-27 21:05:49.889114884 +0000 @@ -314,7 +314,7 @@ auth = config.proxy_username + password_part url = '@'.join((auth, url)) - session.proxies[protocol] = url + session.proxies['http'] = '://'.join((protocol, url)) # -- thread-safe generator queue ----------------------------------------------- Hope this is of any help. Rgrds, Martijn This issue was fixed in nectar, but that fix is not available in the 2.2 repository. We are going to update python-nectar in the 2.2 repo, which should take care of this. Rebuilt to include nectar-1.1.2-1 in: http://repos.fedorapeople.org/repos/pulp/pulp/beta/2.2/ *** This bug has been marked as a duplicate of bug 1014368 *** |