Bug 845010 - Creating a second repo with the same feed is successful but fails to create any repos after.
Creating a second repo with the same feed is successful but fails to create a...
Status: CLOSED DUPLICATE of bug 1004897
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
high Severity unspecified
: ---
: 2.3.0
Assigned To: Barnaby Court
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-01 09:16 EDT by Preethi Thomas
Modified: 2013-09-09 13:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-09 13:23:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pulp.log (5.54 KB, text/plain)
2012-08-01 09:16 EDT, Preethi Thomas
no flags Details

  None (edit)
Description Preethi Thomas 2012-08-01 09:16:08 EDT
Created attachment 601745 [details]
pulp.log

Description of problem:

Using the same feed to create a 2nd repo is successful. But gets conflicting relative path error when creating any repos with any feed.

Version-Release number of selected component (if applicable):
[root@preethi-el6-pulp ~]# rpm -qa |grep pulp
python-pulp-common-0.0.319-1.el6.noarch
python-pulp-client-lib-0.0.319-1.el6.noarch
pulp-rpm-admin-extensions-0.0.319-1.el6.noarch
mod_wsgi-3.3-4.pulp.el6.x86_64
python-pulp-rpm-common-0.0.319-1.el6.noarch
pulp-rpm-plugins-0.0.319-1.el6.noarch
python-pulp-bindings-0.0.319-1.el6.noarch
pulp-admin-client-0.0.319-1.el6.noarch
pulp-rpm-admin-client-0.0.319-1.el6.noarch
python-oauth2-1.5.170-3.pulp.el6.noarch
m2crypto-0.21.1.pulp-8.el6.x86_64
pulp-server-0.0.319-1.el6.noarch
pulp-builtins-admin-extensions-0.0.319-1.el6.noarch
pulp-rpm-server-0.0.319-1.el6.noarch
[root@preethi-el6-pulp ~]# 


How reproducible:


Steps to Reproduce:
1. create repo pulp with feed http://repos.fedorapeople.org/repos/pulp/pulp/v2/testing/fedora-17/

2. Sync the repo

3.create a second repo pulp-1 with same feed http://repos.fedorapeople.org/repos/pulp/pulp/v2/testing/fedora-17/

4. Create a 3rd repo with any feed eg: http://download.devel.redhat.com/released/F-16/GOLD/Fedora/x86_64/os/
  
Actual results:

[root@preethi-el6-pulp ~]# pulp-admin repo create --repo-id=f15 --feed=http://download.devel.redhat.com/released/F-16/GOLD/Fedora/x86_64/os/
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:
from admin.log

2012-08-01 08:58:46,175 - ERROR - Exception occurred:
        href:      /pulp/api/v2/repositories/
        method:    POST
        status:    400
        error:     Pulp exception occurred: PulpDataException
        traceback: None
        data:      {u'args': [[u"Relative URL lookup table encountered a conflict with repo <pulp-1> with relative_url </repos/pulp/pulp/v2/testing/fedora-17/> broken into [u'repos', u'pulp', u'pulp', u'v2', u'testing', u'fedora-17'].\nThis repo <pulp-1> conflicts with an existing repos sub directories, specific sub dirs of conflict are {u'x86_64': {'url': u'/repos/pulp/pulp/v2/testing/fedora-17/x86_64/', 'repo_id': u'pulp'}}"]]}
Comment 1 Michael Hrivnak 2013-09-04 17:29:15 EDT
Turning this over to Barnaby, who recently did work in this area. Creating two repos in a row with the same feed now produces an error, but not the helpful kind. Here is the second create:

$ pulp-admin rpm repo create --repo-id=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.


An here is pulp.log:

Traceback (most recent call last):
  File "/home/mhrivnak/git/pulp/server/pulp/server/managers/repo/distributor.py", line 169, in add_distributor
    result = distributor_instance.validate_config(transfer_repo, call_config, config_conduit)
  File "/usr/lib/pulp/plugins/distributors/yum_distributor/distributor.py", line 217, in validate_config
    if conflict_items.count() > 0:
TypeError: count() takes exactly one argument (0 given)


I think that on the line linked below, you want "len(conflict_items)" instead of "conflict_items.count()". It's also pythonic to just say "if conflict_items:"
Comment 2 Barnaby Court 2013-09-09 13:23:00 EDT
This item was also fixed by 1004897

*** This bug has been marked as a duplicate of bug 1004897 ***

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