Bug 1114694 - repo create failing with relative-url conflict error
Summary: repo create failing with relative-url conflict error
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 2.6.0
Assignee: amacdona@redhat.com
QA Contact: Irina Gulina
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-30 17:02 UTC by Preethi Thomas
Modified: 2015-02-28 22:11 UTC (History)
6 users (show)

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


Attachments (Terms of Use)


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

Description Preethi Thomas 2014-06-30 17:02:15 UTC
Description of problem:
I created a repo with feed  http://mirror.centos.org/centos/6.5/os/x86_64/ with no --relative-url specified. Then I tried to create a another repo the --feed http://mirror.centos.org/centos/6.5/extras/x86_64/ and it failed with conflicting --relative-url error


Version-Release number of selected component (if applicable):
[root@mgmt3 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.23.beta.el6.noarch
[root@mgmt3 ~]# 


How reproducible:


Steps to Reproduce:
1.create a repo with --feed http://mirror.centos.org/centos/6.5/os/x86_64/
2.create another repo with --feed http://mirror.centos.org/centos/6.5/extras/x86_64/ 

3.

Actual results:
[root@mgmt3 yum.repos.d]# pulp-admin rpm repo create --repo-id centon-extras --feed http://mirror.centos.org/centos/6.5/extras/x86_64/
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:
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR: Exception received from distributor [yum_distributor] while validating config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR: Traceback (most recent call last):
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/distributor.py", line 171, in add_distributor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:     result = distributor_instance.validate_config(transfer_repo, call_config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 84, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:     return configuration.validate_config(repo, config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 116, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:     _check_for_relative_path_conflicts(repo, config, config_conduit, error_messages)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 462, in _check_for_relative_path_conflicts
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR:     conflicting_relative_url = distributor['config']['relative_url'] or conflicting_repo_id
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.distributor:ERROR: KeyError: 'relative_url'
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR: Exception adding distributor to repo [centon-extras]; the repo will be deleted
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR: Traceback (most recent call last):
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/cud.py", line 186, in create_and_configure_repo
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:     distributor_id)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/distributor.py", line 171, in add_distributor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:     result = distributor_instance.validate_config(transfer_repo, call_config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 84, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:     return configuration.validate_config(repo, config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 116, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:     _check_for_relative_path_conflicts(repo, config, config_conduit, error_messages)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 462, in _check_for_relative_path_conflicts
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR:     conflicting_relative_url = distributor['config']['relative_url'] or conflicting_repo_id
Jun 30 13:01:07 mgmt3 pulp: pulp.server.managers.repo.cud:ERROR: PulpDataException: Pulp exception occurred: PulpDataException
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR: Pulp exception occurred: PulpDataException
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR: Traceback (most recent call last):
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/middleware/exception.py", line 44, in __call__
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self.app(environ, start_response)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/middleware/postponed.py", line 42, in __call__
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self.app(environ, start_response)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 279, in wsgi
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     result = self.handle_with_processors()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 29, in _handle_with_processors
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return process(self.processors)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 566, in processor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return handler()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in <lambda>
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 581, in processor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     result = handler()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in <lambda>
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 28, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self.handle()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self._delegate(fn, self.fvars, args)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 422, in _delegate
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return f()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 430, in <lambda>
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     f = lambda: self._delegate_sub_application(pat, what)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 455, in _delegate_sub_application
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return app.handle_with_processors()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 29, in _handle_with_processors
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return process(self.processors)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 566, in processor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return handler()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in <lambda>
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 581, in processor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     result = handler()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in <lambda>
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return p(lambda: process(processors))
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 28, in process
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self.handle()
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return self._delegate(fn, self.fvars, args)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return handle_class(cls)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return tocall(*args)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 227, in _auth_decorator
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     value = method(self, *args, **kwargs)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 166, in POST
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     repo = repo_manager.create_and_configure_repo(*args, **kwargs)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/cud.py", line 186, in create_and_configure_repo
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     distributor_id)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/distributor.py", line 171, in add_distributor
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     result = distributor_instance.validate_config(transfer_repo, call_config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/distributor.py", line 84, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     return configuration.validate_config(repo, config, config_conduit)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 116, in validate_config
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     _check_for_relative_path_conflicts(repo, config, config_conduit, error_messages)
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:   File "/usr/lib/python2.6/site-packages/pulp_rpm/plugins/distributors/yum/configuration.py", line 462, in _check_for_relative_path_conflicts
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR:     conflicting_relative_url = distributor['config']['relative_url'] or conflicting_repo_id
Jun 30 13:01:07 mgmt3 pulp: pulp.server.webservices.middleware.exception:ERROR: PulpDataException: Pulp exception occurred: PulpDataException

Comment 1 Michael Hrivnak 2014-06-30 20:20:30 UTC
Works for me in F20. Maybe it's an el6-specific bug?

$ pulp-admin rpm repo create --repo-id=foo1 --feed=http://mirror.centos.org/centos/6.5/os/x86_64/
/usr/lib64/python2.7/site-packages/pymongo/mongo_replica_set_client.py:340: 
Successfully created repository [foo1]

$ pulp-admin rpm repo create --repo-id=foo2 --feed=http://mirror.centos.org/centos/6.5/os/x86_64/
/usr/lib64/python2.7/site-packages/pymongo/mongo_replica_set_client.py:340:
The server indicated one or more values were incorrect. The server provided the
following error message:

   Relative URL [centos/6.5/os/x86_64/] for repository [foo2] conflicts with
existing relative URL [/centos/6.5/os/x86_64/] for repository [foo1]

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

Comment 2 amacdona@redhat.com 2014-11-24 19:56:53 UTC
This related to this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1079511

and should be fixed by that PR as well.

https://github.com/pulp/pulp/pull/1297

Comment 3 Preethi Thomas 2014-11-25 15:58:22 UTC
will verify when verifying the other bz

Comment 4 Randy Barlow 2014-12-12 18:54:58 UTC
Should this have a 2.6.0 target release on it?

Comment 5 amacdona@redhat.com 2015-01-19 16:06:53 UTC
Yes, this should be 2.6.0

Comment 6 Chris Duryee 2015-02-10 22:33:00 UTC
2.6.0-0.7.beta

Comment 7 Irina Gulina 2015-02-13 16:23:37 UTC
>> rpm -qa pulp-server
pulp-server-2.6.0-0.7.beta.el6.noarch

>> pulp-admin rpm repo create --repo-id bobik --feed http://ftp.cvut.cz/centos/6.6/extras/x86_64/
Successfully created repository [bobik]

>> pulp-admin rpm repo create --repo-id lelik --feed http://ftp.cvut.cz/centos/6.6/os/x86_64/
Successfully created repository [lelik]

Then I successfully sync'ed both repos and 

>> pulp-admin rpm repo list --details
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  bobik
Display Name:        bobik
Description:         None
Content Unit Counts: 
  Drpm:                   3
  Rpm:                    37
  Yum Repo Metadata File: 1
Notes:               
Importers:           
  Config:           
    Feed: http://ftp.cvut.cz/centos/6.6/extras/x86_64/
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        2015-02-13T16:02:09Z
  Repo Id:          bobik
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Checksum Type: sha256
    Http:          False
    Https:         True
    Relative URL:  /centos/6.6/extras/x86_64/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        2015-02-13T16:02:10Z
  Repo Id:             bobik
  Scheduled Publishes: 
  Auto Publish:        False
  Config:              
    Http:  False
    Https: True
  Distributor Type Id: export_distributor
  Id:                  export_distributor
  Last Publish:        None
  Repo Id:             bobik
  Scheduled Publishes: 

Id:                  lelik
Display Name:        lelik
Description:         None
Content Unit Counts: 
  Distribution:     1
  Package Category: 14
  Package Group:    212
  Rpm:              6518
Notes:               
Importers:           
  Config:           
    Feed: http://ftp.cvut.cz/centos/6.6/os/x86_64/
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        2015-02-13T16:12:59Z
  Repo Id:          lelik
  Scheduled Syncs:  
Distributors:        
  Auto Publish:        True
  Config:              
    Checksum Type: sha256
    Http:          False
    Https:         True
    Relative URL:  /centos/6.6/os/x86_64/
  Distributor Type Id: yum_distributor
  Id:                  yum_distributor
  Last Publish:        2015-02-13T16:13:49Z
  Repo Id:             lelik
  Scheduled Publishes: 
  Auto Publish:        False
  Config:              
    Http:  False
    Https: True
  Distributor Type Id: export_distributor
  Id:                  export_distributor
  Last Publish:        None
  Repo Id:             lelik
  Scheduled Publishes:

Comment 8 Brian Bouterse 2015-02-28 22:11:35 UTC
Moved to https://pulp.plan.io/issues/461


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