Bug 669791 - Need a useful error message when trying to upload to a repo that doesn't exist
Summary: Need a useful error message when trying to upload to a repo that doesn't exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: Sprint 20
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-01-14 19:19 UTC by Jay Dobies
Modified: 2011-07-15 19:33 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-02-17 16:52:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-01-14 19:19:50 UTC
In the following example, there is no repo with the ID "foo". Rather than just blanket telling the user it failed, we should indicate to them why it did.


$ pulp-admin repo upload --id foo --dir /root/cloude-rpms
Failed to upload [httpd-2.2.3-40.el5.src.rpm] to repo [ foo ]
Failed to upload [rh-cds-conf-0.17-1.noarch.rpm] to repo [ foo ]
Failed to upload [rh-cds-conf-0.18-1.noarch.rpm] to repo [ foo ]
Failed to upload [mod_ssl-2.2.3-40.el5.i386.rpm] to repo [ foo ]
Failed to upload [rh-rhua-0.25-1.el5.noarch.rpm] to repo [ foo ]
Failed to upload [httpd-2.2.3-40.el5.i386.rpm] to repo [ foo ]

Comment 1 Pradeep Kilambi 2011-02-09 15:50:34 UTC
The new revamped upload fixes this:

$ sudo pulp-admin package upload ~/ConsoleKit-debuginfo-0.4.1-3.el6.i686.rpm --repoid i_dont_exist
STEP: ** Performing Package Uploads to Pulp server **
Package [ConsoleKit-debuginfo-0.4.1-3.el6.i686.rpm] already exists on the server with checksum [{u'sha256': u'3aab26ff8c6a8d031f29f7751669ed1f160558b6ec4bc63822bf417626b3ab8a'}]
STEP: ** Performing Repo Associations **
Repo i_dont_exist does not exist; skipping

Comment 2 Preethi Thomas 2011-02-09 18:08:26 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.137-1.fc14.noarch


[root@preethi ~]#  pulp-admin package upload --id foo --dir /root/repo-dir/
Usage: pulp-admin <options> package upload <options>

pulp-admin: error: no such option: --id
[root@preethi ~]#  pulp-admin package upload --repoid foo --dir /root/repo-dir/
STEP: ** Performing Package Uploads to Pulp server **
Successfully uploaded [pulp-cds-0.0.121-1.fc14.noarch.rpm] to server
STEP: ** Performing Repo Associations **
Repo foo does not exist; skipping

[root@preethi ~]#  pulp-admin package upload --repoid foo --dir /root/repo-dir/
STEP: ** Performing Package Uploads to Pulp server **
Package [pulp-cds-0.0.121-1.fc14.noarch.rpm] already exists on the server with checksum [{'sha256': '27b1ce8225b9cfb05527feccc2f17cae'}]
STEP: ** Performing Repo Associations **
Repo foo does not exist; skipping

[root@preethi ~]#  pulp-admin package upload --help
Usage: pulp-admin <options> package upload <options>

Options:
  -h, --help            show this help message and exit
  --dir=DIR             process packages from this directory
  -r REPOIDS, --repoid=REPOIDS
                        Optional repoid, to associate the uploaded package
[root@preethi ~]#  pulp-admin package upload --repoid upload-repo --dir /root/repo-dir/
STEP: ** Performing Package Uploads to Pulp server **
Package [pulp-cds-0.0.121-1.fc14.noarch.rpm] already exists on the server with checksum [{'sha256': '27b1ce8225b9cfb05527feccc2f17cae'}]
STEP: ** Performing Repo Associations **
Successfully Associated Packages ['/root/repo-dir/pulp-cds-0.0.121-1.fc14.noarch.rpm'] to Repo upload-repo

Comment 3 Preethi Thomas 2011-02-17 16:52:27 UTC
Closing with community release 

pulp-0.0.139-1.fc14.noarch


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