Bug 669789
| Summary: | Need a cleaner error message when trying to upload packages to a feed-based repo | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Jay Dobies <jason.dobies> |
| Component: | z_other | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | unspecified | CC: | jconnor, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 12:06:48 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488 | ||
I believe this is fixed and we do allow uploads to yum feed repo as well.
$ sudo pulp-admin repo list
+------------------------------------------+
List of Available Repositories
+------------------------------------------+
Id test1
Name test1
FeedURL http://repos.fedorapeople.org/repos/pulp/pulp/fedora-14/i386/
FeedType yum
Arch noarch
Sync Schedule None
Packages 10
Files 6
Distributions None
Publish True
Clones [u'test-repo']
Groups None
Filters []
$ sudo pulp-admin content upload -r test1 --dir /var/lib/pulp/repos/repos/pulp/pulp/fedora-14/i386/
* Starting Package Upload operation. See /var/log/pulp/client.log for more verbose output
* Performing Package Uploads to Pulp server
* Performing Repo Associations
* Content Upload complete.
Also note that repo upload is moved to "content upload". verified
[root@preethi ~]# pulp-admin repo list
+------------------------------------------+
List of Available Repositories
+------------------------------------------+
Id pulp-repo
Name pulp-repo
FeedURL http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-14/x86_64/
FeedType yum
Feed Certs No
Consumer Certs No
Arch x86_64
Sync Schedule None
Packages 10
Files 0
Distributions None
Publish True
Clones []
Groups None
Filters []
[root@preethi ~]# pulp-admin content upload /root/redhat-ddns-client-1.3-3.noarch.rpm -r pulp-repo -v
* Starting Package Upload
* Performing Package Uploads to Pulp server
Package [redhat-ddns-client-1.3-3.noarch.rpm] already exists on the server with checksum [74b7e90d415a679672b542fadc8b1a28e480a83409c949fb6962f6204e7796bc]
* Performing Repo Associations
Package association Complete for Repo [pulp-repo]:
Packages:
redhat-ddns-client-1.3-3.noarch.rpm
Files:
None
* Content Upload complete.
Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |
In the following, repo1 was synchronized from a yum repo. I'm guessing the upload failed because we don't allow uploads into that repo, but we need to both hide the traceback and indicate *why* uploads aren't allowed. $ pulp-admin repo upload --id repo1 --dir /root/cloude-rpms error: operation failed: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 57, in report_error return method(self, *args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py", line 131, in check_roles result = f(instance, *fargs, **kw) File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 348, in upload data['pkgstream']) File "/usr/lib/python2.7/site-packages/pulp/server/compat.py", line 38, in _decorator return decorator(*args,**kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/auditing.py", line 204, in _audit result = method(*args, **kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 1222, in upload raise PulpException('Package Uploads are not allowed to Repo %s' % repo['id']) PulpException: u'Package Uploads are not allowed to Repo repo1'