Bug 1014368 - Not able to sync cdn repos when using proxy setting
Not able to sync cdn repos when using proxy setting
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: z_other (Show other bugs)
2.2
Unspecified Unspecified
urgent Severity unspecified
: ---
: 2.2.1
Assigned To: Sayli Karmarkar
Preethi Thomas
: Triaged
: 1011972 1015218 (view as bug list)
Depends On:
Blocks: 1017404
  Show dependency treegraph
 
Reported: 2013-10-01 16:11 EDT by Preethi Thomas
Modified: 2015-03-22 21:12 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1017404 (view as bug list)
Environment:
Last Closed: 2013-12-09 09:37:16 EST
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)

  None (edit)
Description Preethi Thomas 2013-10-01 16:11:34 EDT
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 17:34:11 EDT
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 14:10:37 EDT
*** Bug 1015218 has been marked as a duplicate of this bug. ***
Comment 3 Sayli Karmarkar 2013-10-09 15:49:43 EDT
Merged and tagged all the relevant packages and dependencies.
Comment 4 Sayli Karmarkar 2013-10-09 15:56:19 EDT
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 16:52:37 EDT
*** Bug 1011972 has been marked as a duplicate of this bug. ***
Comment 6 Jeff Ortel 2013-10-09 22:41:37 EDT
build: 2.2.1-1
Comment 7 Jeff Ortel 2013-10-10 19:46:44 EDT
build: 2.2.0-2.
Comment 8 Preethi Thomas 2013-10-11 13:50:06 EDT
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 09:37:16 EST
Released pulp 2.2.1

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