Bug 1138873

Summary: Bad return code upon failed repo sync
Product: [Retired] Pulp Reporter: Sean Waite <swaite>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: pulp-qe-list
Severity: low Docs Contact:
Priority: medium    
Version: 2.4.0CC: mhrivnak
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 22:18:44 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 Sean Waite 2014-09-05 21:21:29 UTC
Description of problem:

When running "pulp-admin rpm repo sync run" against a repo with a bad URL in it's --feed option, pulp-admin returns 0.

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

CentOS release 6.5 (Final)

How reproducible:


Steps to Reproduce:
1. Create a repo with a bogus URL in it's --feed
2. Run the sync
3. Watch it bail out

Actual results:

-bash-4.1# pulp-admin rpm repo create --repo-id dummy --feed http://www.asrcdyasrco.com
-bash-4.1# pulp-admin rpm repo sync run --repo-id dummy
                    Synchronizing Repository [dummy]

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

Downloading metadata...
... failed

HTTPConnectionPool(host='www.asrcdyasrco.com', port=80): Max retries exceeded
with url: /repodata/repomd.xml (Caused by <class 'socket.gaierror'>: [Errno -2]
Name or service not known)

Task Failed

Importer indicated a failed response

-bash-4.1# echo $?

Expected results:

Return code should be non-zero to indicate failure.

Comment 1 Brian Bouterse 2015-02-28 22:18:44 UTC
Moved to https://pulp.plan.io/issues/515