Bug 1014368 - Not able to sync cdn repos when using proxy setting
Summary: Not able to sync cdn repos when using proxy setting
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: 2.2
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
: 2.2.1
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
: 1011972 1015218 (view as bug list)
Depends On:
Blocks: 1017404
TreeView+ depends on / blocked
 
Reported: 2013-10-01 20:11 UTC by Preethi Thomas
Modified: 2015-03-23 01:12 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
: 1017404 (view as bug list)
Environment:
Last Closed: 2013-12-09 14:37:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2013-10-01 20:11:34 UTC
Description of problem:
if I use the --feed-cert options with proxy, repo sync fails

Version-Release number of selected component (if applicable):
[root@ibm-ls22-05 ~]# rpm -qa |grep nectar
python-nectar-1.1.2-1.el6.noarch
[root@ibm-ls22-05 ~]# 



Tested in both 2.2 & 2.3 with the above nectar

How reproducible:


Steps to Reproduce:
1. Create a repo with proxy-host & port and feed certs/keys (eg: CDN repo)
2. Try to sync the repo

Actual results:

[root@ibm-ls22-05 ~]# pulp-admin rpm repo create --repo-id rhel6-4 --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.4/i386/os/ --feed-ca-cert CDN/cdn.redhat.com-chain.crt --feed-cert CDN/1359391926_4512.crt  --feed-key CDN/1359391926_4512.key --proxy-host=http://pulp-proxy.usersys.redhat.com --proxy-port 3128 
Successfully created repository [rhel6-4]



[root@ibm-ls22-05 ~]# pulp-admin rpm repo sync run --repo-id rhel6-4 
+----------------------------------------------------------------------+
                   Synchronizing Repository [rhel6-4]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...
[|]
... failed

Service Unavailable

[root@ibm-ls22-05 ~]# 



2013-10-01 14:56:16,963 urllib3.connectionpool:INFO: Starting new HTTP connection (1): pulp-proxy.usersys.redhat.com
2013-10-01 14:56:18,885 nectar.downloaders.threaded:ERROR: Download of https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.4/i386/os/repodata/repomd.xml failed with code 503: Service Unavailable
2013-10-01 14:56:18,888 pulp_rpm.plugins.importers.yum.sync:ERROR: sync failed
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 109, in run
    metadata_files = self.get_metadata()
  File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/importers/yum/sync.py", line 194, in get_metadata
    raise FailedException(str(e))
FailedException: Service Unavailable
2013-10-01 14:56:18,900 pulp.server.dispatch.task:ERROR: Importer indicated a failed response
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/dispatch/task.py", line 138, in _run
    result = call(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 117, in sync
    raise PulpExecutionException(_('Importer indicated a failed response'))
PulpExecutionException: Importer indicated a failed response
2013-10-01 14:56:18,902 pulp.server.dispatch.task:INFO: FAILURE: Task 9fc2f4ee-aa28-4453-b703-0255a35f358c: CallRequest: RepoSyncManager.sync(u'rhel6-4', sync_config_override=None)
Expected results:


Additional info:

Comment 1 Sayli Karmarkar 2013-10-08 21:34:11 UTC
https://github.com/pulp/pulp/pull/656

Added python-requests-2.0.0 package to pulp dependencies which also contains latest urllib3 in order to support proxy with https.

Comment 2 Sayli Karmarkar 2013-10-09 18:10:37 UTC
*** Bug 1015218 has been marked as a duplicate of this bug. ***

Comment 3 Sayli Karmarkar 2013-10-09 19:49:43 UTC
Merged and tagged all the relevant packages and dependencies.

Comment 4 Sayli Karmarkar 2013-10-09 19:56:19 UTC
Created a clone to track and verify the fix in 2.3 as well. https://bugzilla.redhat.com/show_bug.cgi?id=1017404

Comment 5 Sayli Karmarkar 2013-10-09 20:52:37 UTC
*** Bug 1011972 has been marked as a duplicate of this bug. ***

Comment 6 Jeff Ortel 2013-10-10 02:41:37 UTC
build: 2.2.1-1

Comment 7 Jeff Ortel 2013-10-10 23:46:44 UTC
build: 2.2.0-2.

Comment 8 Preethi Thomas 2013-10-11 17:50:06 UTC
verified
[root@qe-blade-04 ~]# rpm -qa |grep pulp-server
pulp-server-2.2.0-2.el6.noarch
[root@qe-blade-04 ~]# 
[root@qe-blade-04 ~]# rpm -qa |grep python-nectar
python-nectar-1.1.4-1.el6.noarch

[root@qe-blade-04 ~]pulp-admin rpm repo create --repo-id rhel6-4 --feed https://cdn.redhat.com/content/dist/rhel/rhui/server/6/6.4/x86_64/os/ --feed-ca-cert CDN/cdn.redhat.com-chain.crt --feed-cert CDN/1359391926_4512.crt  --feed-key CDN/1359391926_4512.key --remove-missing true --proxy-host http://pulp-proxy.usersys.redhat.com --proxy-port 3128Successfully created repository [rhel6-4]

[root@qe-blade-04 ~]# 
[root@qe-blade-04 ~]# 
[root@qe-blade-04 ~]# pulp-admin rpm repo sync run --repo-id rhel6-4 
+----------------------------------------------------------------------+
                   Synchronizing Repository [rhel6-4]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading metadata...


from squid.log on my proxy

1381504695.999  27533 10.16.76.35 TCP_MISS/200 1148167 CONNECT cdn.redhat.com:443 - DIRECT/173.222.152.251 -
1381504704.380  35912 10.16.76.35 TCP_MISS/200 1804500 CONNECT cdn.redhat.com:443 - DIRECT/173.222.152.251 -
1381504760.794  92324 10.16.76.35 TCP_MISS/200 2866782 CONNECT cdn.redhat.com:443 - DIRECT/173.222.152.251 -

Comment 9 Preethi Thomas 2013-12-09 14:37:16 UTC
Released pulp 2.2.1


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