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:
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.
https://github.com/pulp/pulp/pull/1297
fixed in pulp 2.6.0-0.2.beta
>> 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.
Moved to https://pulp.plan.io/issues/407