Bug 1316229

Summary: Unable to sync repositories while using authenticated HTTP proxy - RPM1004: Error retrieving metadata: Not found
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Roman Plevka <rplevka>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, bmbouter, cwelton, daviddavis, dkliban, ehelms, ggainey, ipanova, mhrivnak, mmccune, omaciel, pcreech, rchan, ttereshc
Target Milestone: UnspecifiedKeywords: PrioBumpQA, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:17:04 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:

Description Roman Plevka 2016-03-09 17:49:36 UTC
Description of problem:
Getting "RPM1004: Error retrieving metadata: Not found" while trying to sync a repository on a satellite configured to use squid HTTP proxy.

the message seen from satellite is 
"RPM1004: Error retrieving metadata: Not found"

while squid/access.log shows:
1457543658.360      0 <ip> TCP_DENIED/407 3605 CONNECT cdn.redhat.com:443 - HIER_NONE/- text/html

the /etc/pulp/server/plugins.conf.d/yum_importer.json:
{
  "proxy_host": "http://my.squid_proxy.server",
  "proxy_port": 3128,
  "proxy_username": "login",
  "proxy_password": "pass"
}

- after removing the proxy configuration from yum_importer.json, the sync works fine.


Version-Release number of selected component (if applicable):
# rpm -qa *pulp*
pulp-rpm-plugins-2.8.0.1-1.beta.el6sat.noarch
python-pulp-puppet-common-2.8.0.1-2.beta.el6sat.noarch
python-pulp-oid_validation-2.8.0.1-0.7.beta.el6sat.noarch
pulp-nodes-parent-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-docker-common-2.0.0.1-1.beta.el6sat.noarch
pulp-selinux-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-bindings-2.8.0.1-0.7.beta.el6sat.noarch
pulp-nodes-common-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-streamer-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-common-2.8.0.1-0.7.beta.el6sat.noarch
python-pulp-rpm-common-2.8.0.1-1.beta.el6sat.noarch
pulp-client-1.0-1.noarch
rubygem-smart_proxy_pulp-1.2.0-1.el6sat.noarch
python-pulp-repoauth-2.8.0.1-0.7.beta.el6sat.noarch
pulp-katello-1.0-3.el6sat.noarch
pulp-puppet-plugins-2.8.0.1-2.beta.el6sat.noarch
pulp-puppet-tools-2.8.0.1-2.beta.el6sat.noarch
pulp-docker-plugins-2.0.0.1-1.beta.el6sat.noarch
pulp-server-2.8.0.1-0.7.beta.el6sat.noarch


How reproducible:
- always with authed http proxy

Steps to Reproduce:
1. setup a squid http proxy server with http authentication
2. configure satellite to use the proxy server
3. try to sync some RH or custom repo

Actual results:
RPM1004: Error retrieving metadata: Not found

Expected results:
sync works

Additional info:

I was able to reproduce the err 407 using a simple netcat session:
$ nc my_proxy 3128
CONNECT cdn.redhat.com:443

(complete output: http://pastebin.test.redhat.com/355348)

When i specify the HTTP/1.1 at the end of the first request line, squid proxy waits for me to send the headers (including the auth header):

$ nc my_proxy 3128
CONNECT cdn.redhat.com:443 HTTP/1.1
Proxy-Authorization: Basic HLbtd5HnrVdfHWA7

HTTP/1.1 200 Connection established

Comment 1 pulp-infra@redhat.com 2016-03-09 20:21:04 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 2 pulp-infra@redhat.com 2016-03-09 20:21:05 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 3 pulp-infra@redhat.com 2016-03-09 23:00:24 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 4 pulp-infra@redhat.com 2016-03-09 23:00:26 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2016-03-11 12:30:21 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 6 Corey Welton 2016-03-17 15:32:48 UTC
VERIFIED in snap4.  Auth'd proxy works.

Comment 7 pulp-infra@redhat.com 2016-04-25 18:03:53 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 10 Bryan Kearney 2016-07-27 11:17:04 UTC
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.

https://access.redhat.com/errata/RHBA-2016:1501