Bug 973738 - repo upload does not check to see if the repo-id exists until after uploading to the server
Summary: repo upload does not check to see if the repo-id exists until after uploading...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.2 Beta
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: 2.6.0
Assignee: Michael Hrivnak
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-12 15:18 UTC by Jeremy Cline
Modified: 2015-02-28 21:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 21:57:01 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 357 0 None None None Never

Description Jeremy Cline 2013-06-12 15:18:34 UTC
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 21:44:22 UTC
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 20:52:56 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 4 Preethi Thomas 2015-01-29 14:50:46 UTC
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 21:57:01 UTC
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.