Bug 1373662

Summary: Forbidden responses from repository syncs mistakenly report "Not Found"
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, bkearney, cdonnell, chrobert, jcallaha, mhrivnak
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-07 16:27:31 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 Justin Sherrill 2016-09-06 22:00:57 UTC
Description of problem:

When syncing a repository from the cdn or anywhere, if the webserver returns Forbidden pulp seems to interpret this as "Not Found".

Version-Release number of selected component (if applicable):
6.2.1

How reproducible:
Always

Steps to Reproduce:
1. Create a custom repo with a feed of https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.2/os
2. Sync the repo

Actual results:
Error will be reported as "Not found"

Expected results:
Error is reported as "Forbidden" 


Additional info:
I had to add some extra debugging to pulp to realize "Forbidden" was being thrown and then something was eating that and throwing 'Not Found'.

Comment 1 Brad Buckingham 2016-09-09 15:25:07 UTC
Michael, can you have someone investigate and triage to pulp upstream?  Thanks!

Comment 3 Michael Hrivnak 2016-09-09 19:31:35 UTC
This appears to work correctly on pulp master, which will become 2.11. I didn't test anything earlier. If you need more detail on exactly when this behavior may have changed, or anything else, please NEEDSINFO me again.



[vagrant@dev ~]$ pulp-admin rpm repo create --repo-id=rhel --verify-feed-ssl=false --feed=https://cdn.redhat.com/content/dist/rhel/server/7/7Server/x86_64/sat-tools/6.2/os
Successfully created repository [rhel]

[vagrant@dev ~]$ pulp-admin rpm repo sync run --repo-id=rhel
+----------------------------------------------------------------------+
                    Synchronizing Repository [rhel]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Downloading metadata...
[\]
... completed

Downloading repository content...
[-]
[==================================================] 100%
RPMs:       0/0 items
Delta RPMs: 0/0 items

... completed

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items

Task Failed

Error retrieving metadata: Forbidden



This is the relevant excerpt of the TaskStatus report:

    "error": {
    "code": "RPM1004", 
    "data": {
      "reason": "Forbidden"
    }, 
    "description": "Error retrieving metadata: Forbidden", 
    "sub_errors": []

Comment 6 Bryan Kearney 2016-10-07 16:27:31 UTC
Since https://bugzilla.redhat.com/show_bug.cgi?id=1364712 was delivered in an errata, I am moving this to CLOSED/CURRENT RELEASE. If customers still see this issue after upgrading to that errata, please feel free to re-open with additional data.