Bug 973738 - repo upload does not check to see if the repo-id exists until after uploading to the server
repo upload does not check to see if the repo-id exists until after uploading...
Status: CLOSED UPSTREAM
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
2.2 Beta
Unspecified Unspecified
low Severity unspecified
: ---
: 2.6.0
Assigned To: Michael Hrivnak
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 11:18 EDT by Jeremy Cline
Modified: 2015-02-28 16:57 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-28 16:57:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Pulp Redmine 357 None None None Never

  None (edit)
Description Jeremy Cline 2013-06-12 11:18:34 EDT
Description of problem: When uploading to a repository, pulp-admin never checks to see if the repo-id is real, so an error is not reported until after the upload is finished and pulp attempts to import  into the repository. It reports the error correctly, but it's not pleasant recieve that error after uploading large files to the server


Version-Release number of selected component (if applicable): pulp-admin-client-2.2.0-0.3.beta.fc18.noarch


How reproducible: Always


Steps to Reproduce:
This definitely occurs with rpms and isos, and probably everything else.

1. Create a largish iso: dd if=/dev/zero of=garbage.iso bs=2048 count=100000
2. Upload to a non-existent repository: pulp-admin iso repo uploads upload --repo-id=not_real --file=garbage.iso
3. Wait

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

Extracting necessary metadata for each request...
[==================================================] 100%
Analyzing: garbage.iso
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: garbage.iso
... 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.

Uploading: garbage.iso
[==================================================] 100%
204800000/204800000 bytes
... completed

Importing into the repository...
The following resource(s) could not be found:

  not_real (repository)


Expected results:
An error concerning the invalid resource prior to uploading

Additional info:
Comment 2 Chris Duryee 2014-11-11 16:44:22 EST
This works for me as of 2.4.3.

$ dd if=/dev/zero of=garbage.iso bs=2048 count=100000
100000+0 records in
100000+0 records out
204800000 bytes (205 MB) copied, 0.869267 s, 236 MB/s

$ pulp-admin iso repo uploads upload --repo-id=not_real --file=garbage.iso
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

The following resource(s) could not be found:

  not_real (repo)


moving to MODIFIED for 2.5.1 so it gets picked up for testing.
Comment 3 Chris Duryee 2014-12-23 15:52:56 EST
fixed in pulp 2.6.0-0.2.beta
Comment 4 Preethi Thomas 2015-01-29 09:50:46 EST
verified
[root@cloud-qe-4 ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 ~]# dd if=/dev/zero of=garbage.iso bs=2048 count=100000
100000+0 records in
100000+0 records out
204800000 bytes (205 MB) copied, 0.162063 s, 1.3 GB/s
[root@cloud-qe-4 ~]# ls
anaconda-ks.cfg  garbage.iso  NETBOOT_METHOD.TXT  RECIPE.TXT
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# pulp-admin iso repo uploads upload --repo-id=not_real --file=garbage.iso
+----------------------------------------------------------------------+
                              Unit Upload
+----------------------------------------------------------------------+

The following resource(s) could not be found:

  not_real (repo)


[root@cloud-qe-4 ~]#
Comment 5 Brian Bouterse 2015-02-28 16:57:01 EST
Moved to https://pulp.plan.io/issues/357

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