Bug 972928

Summary: providing a malformed csv file to uploads erratum causes a misleading error message
Product: [Retired] Pulp Reporter: Jeremy Cline <jcline>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED DUPLICATE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: low    
Version: 2.2 BetaCC: jason.dobies, mhrivnak, nobody
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-16 12:23:51 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:

Description Jeremy Cline 2013-06-10 20:17:24 UTC
Description of problem: providing a malformed csv file to the --pkglist-csv option in 'pulp-admin rpm repo uploads erratum' causes a misleading error message to be reported. It appears that even though the bad format is recognised, the upload process is not aborted.


Version-Release number of selected component (if applicable): pulp-rpm-admin-extensions-2.2.0-0.2.beta.fc18.noarch


How reproducible: 


Steps to Reproduce:
1. pulp-admin rpm repo create --repo-id=uploads_errata
2. Create a malformed csv file (for example: "This isn't a csv")
3. pulp-admin rpm repo uploads erratum --repo-id=uploads_errata --erratum_id=test_id --title="Title of the Erratum" --description="A terse description of the erratum" --version=1.0.0 --release=stable --type=enhancement --status=final --updated="2013-06-01 10:15:20" --issued="2013-06-10 20:10:05" --pkglist-csv=/path/to/malformed_csv --from="someone"

Actual results:
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
Bad format [["This isn't a csv"]] in csv [/home/jcline/malformed_csv], 1
arguments, expected 9

... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing upload
... completed

Starting upload of selected units. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Importing into the repository...
The web server reported an error trying to access the Pulp application. The
likely cause is that the pulp-manage-db script has not been run prior to
starting the server. More information can be found in Apache's error log file on
the server itself.



Expected results: Something similar to
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

Extracting necessary metadata for each request...
Bad format [["This isn't a csv"]] in csv [/home/jcline/malformed_csv], 1
arguments, expected 9


Additional info:

Comment 2 Jeremy Cline 2014-06-16 12:23:51 UTC

*** This bug has been marked as a duplicate of bug 1101622 ***