Bug 1079511

Summary: Needs better error handling when the specified relative-url is already used for another repo
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: user-experienceAssignee: amacdona <austin>
Status: CLOSED UPSTREAM QA Contact: Irina Gulina <igulina>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.4.0CC: austin, igulina, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 22:03:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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