Bug 1373662 - Forbidden responses from repository syncs mistakenly report "Not Found"
Summary: Forbidden responses from repository syncs mistakenly report "Not Found"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-06 22:00 UTC by Justin Sherrill
Modified: 2019-12-16 06:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-07 16:27:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


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