Bug 1079511 - Needs better error handling when the specified relative-url is already used for another repo
Summary: Needs better error handling when the specified relative-url is already used f...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 2.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.6.0
Assignee: amacdona@redhat.com
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-21 17:49 UTC by Preethi Thomas
Modified: 2015-02-28 22:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:03:48 UTC
Embargoed:


Attachments (Terms of Use)


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

Description Preethi Thomas 2014-03-21 17:49:54 UTC
Description of problem:

Needs better error handling when the specified relative-url is already used for another repo.

Version-Release number of selected component (if applicable):

[root@cloud-qe-9 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.6.alpha.fc20.noarch
[root@cloud-qe-9 ~]# 
How reproducible:


Steps to Reproduce:
1. Create repo with --relative-url of another repo
2.
3.

Actual results:

[root@cloud-qe-9 ~]# pulp-admin rpm repo create --repo-id pulp --feed http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/pulp_unittest/ --relative-url scientific
The server indicated one or more values were incorrect. The server provided the
following error message:

   Pulp exception occurred: PulpDataException

More information can be found in the client log file ~/.pulp/admin.log.
Expected results:


Additional info:

Comment 1 amacdona@redhat.com 2014-11-11 21:18:16 UTC
Some strange behavior here. It looks like the repo does not claim the namespace of its relative-url, but it does claims the namespace of its repo-id. 


± pulp-admin rpm repo create --repo-id=zoo2 --relative-url=zoo \
--feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [zoo2]


No problem creating a second repo with the same url

± pulp-admin rpm repo create --repo-id=zoo3 --relative-url=zoo \
--feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
Successfully created repository [zoo3]


The issue shows up here because the the relative-url has already been claimed by the repo-id of the first.

± pulp-admin rpm repo create --repo-id=anything --relative-url=zoo2 \
--feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/
The server indicated one or more values were incorrect. The server provided the
following error message:

   Pulp exception occurred: PulpDataException

More information can be found in the client log file ~/.pulp/admin.log.

Comment 2 amacdona@redhat.com 2014-11-17 20:33:21 UTC
https://github.com/pulp/pulp/pull/1297

Comment 3 Chris Duryee 2014-12-23 20:52:25 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 4 Irina Gulina 2015-01-13 11:31:08 UTC
>> rpm -qa pulp-server
pulp-server-2.6.0-0.2.beta.el6.noarch

>> pulp-admin rpm repo create --repo-id repo1 --relative-url repo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/horse-0.22-2.noarch.rpm
Successfully created repository [repo1]

>> pulp-admin rpm repo create --repo-id repo2 --relative-url repo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/zebra-0.1-2.noarch.rpm

The server indicated one or more values were incorrect. The server provided the
following error message:

   Relative URL [repo] for repository [repo2] conflicts with existing relative
URL [repo] for repository [repo1]

More information can be found in the client log file ~/.pulp/admin.log.

Comment 5 Brian Bouterse 2015-02-28 22:03:48 UTC
Moved to https://pulp.plan.io/issues/407


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