Bug 1285734

Summary: Error 403 downloading src.rpm
Product: [Fedora] Fedora Reporter: Mattia Verga <mattia.verga>
Component: fedora-reviewAssignee: Stanislav Ochotnicky <sochotni>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: leamas.alec, pingou, sochotni
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-26 16:17:01 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:
Embargoed:
Attachments:
Description Flags
Debug log none

Description Mattia Verga 2015-11-26 11:07:16 UTC
I have a website where I put .src.rpm and .spec files. I can download those files fine using a browser or urlgrabber, but when I run fedora-review I get a 403 error.

Example: review request #1282575
$ fedora-review -m fedora-rawhide-x86_64 -b 1285042
INFO: Processing bugzilla bug: 1285042
INFO: Getting .spec and .srpm Urls from : 1285042
INFO:   --> SRPM url: http://www.coolbits.it/fedora/kpmcore-1.9.50-3.fc23.src.rpm
INFO:   --> Spec url: http://www.coolbits.it/fedora/kpmcore.spec
INFO: Using review directory: /home/rpmbuild/1285042-kpmcore
INFO: Downloading .spec and .srpm files
ERROR: 'Error 403 downloading http://www.coolbits.it/fedora/kpmcore-1.9.50-3.fc23.src.rpm' (logs in /home/rpmbuild/.cache/fedora-review.log)

The fedora-review.log doesn't say anything more about the error.
With urlgrabber I can download it fine:
$ urlgrabber -D http://www.coolbits.it/fedora/kpmcore-1.9.50-3.fc23.src.rpm
grabbing: http://www.coolbits.it/fedora/kpmcore-1.9.50-3.fc23.src.rpm
2015-11-26 12:03:55,723 attempt 1/None: http://www.coolbits.it/fedora/kpmcore-1.9.50-3.fc23.src.rpm
2015-11-26 12:03:55,723 opening local file "kpmcore-1.9.50-3.fc23.src.rpm" with mode wb
kpmcore-1.9.50-3.fc23.src.rpm                                                            | 352 kB  00:00:00     
2015-11-26 12:03:56,156 success

Comment 1 Alec Leamas 2015-11-26 14:03:51 UTC
I cannot reproduce this. The example runs fine for me. Closing for now, please re-open if there is more info.

Comment 2 Mattia Verga 2015-11-26 15:10:34 UTC
Created attachment 1099315 [details]
Debug log

I attach the log of fedora-review which shows some debug information.

Another user has reported the same failure on review request #1236488

Comment 3 Alec Leamas 2015-11-26 15:49:28 UTC
As you say, the debug info doesn't give that much. The core is that it replies with a 403 (i. e., "forbidden") status message. I can reproduce it on the url in comment #2.

This basically boils down to that that some web servers does not allow fedora-review to download data. Until it can be shown that f-r downloads in a non-standard way I can't really see that the bug is on the f-r side. That it works for me in the first case is yet another sign that this is about the web server configuration.

Given that you can download the srpm this also isn't much of a problem; f-r has the necessary hooks to run the review on a local srpm.

Bottom line: while I do see the problem, I'm not ready to blame f-r at this point. Will close again unless there is more input pointing out f-r as the culprit.

Comment 4 Mattia Verga 2015-11-26 16:05:05 UTC
Ok for closing. The culprit can also be the fact I'm using a CDN (Cloudflare) for my site (I don't know why), I will do some testing with CDN disable.

But what exactly f-r use to download files? Am I right supposing it uses python urlgrabber? So, why using urlgrabber from cli works? Does f-r uses some parameters on calling urlgrabber?

Thanks.

Comment 6 Mattia Verga 2015-11-27 09:15:50 UTC
Just for information: it was a problem related to the use of CDN Cloudflare, maybe some setting of cache or browser integrity check was blocking f-r to work.

Sorry for the noise.