Bug 845941 - Custom repository relative path prefix collision
Summary: Custom repository relative path prefix collision
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: 2.1.1
Assignee: James Slagle
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-06 08:07 UTC by mkovacik
Modified: 2013-02-27 16:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Creating two or more repository paths with the same prefix returned an error. This bug fix corrects how Red Hat Update Appliance checks the repository paths and allows repository paths to share the same prefix.
Clone Of:
Environment:
Last Closed: 2013-02-27 16:59:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screen log (19.65 KB, text/plain)
2012-08-06 08:07 UTC, mkovacik
no flags Details
Verification log (6.16 KB, text/plain)
2013-02-05 14:11 UTC, Vitaly Kuznetsov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0571 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 2.1.1 bug fix update 2013-02-27 21:58:22 UTC

Description mkovacik 2012-08-06 08:07:07 UTC
Created attachment 602456 [details]
Screen log

Description of problem:
If there is a repository with its relative path being a prefix of a new repository being created, an exception is thrown upon commit. If this is desirable behavior then documentation should mention such a limitation.

Version-Release number of selected component (if applicable):
 - build: RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso
 - pulp: 0.0.263-25.el6_3
 - rh-rhui-tools: 2.1.7-1.el6_3

How reproducible:
2 of 2 confirmed, but seems always

Steps to Reproduce:
1. create custom repository, id: 'prefix', with relative path: 'prefix'
2. create custom repository, id: 'prefix-1', with relative path: 'prefix-1/x86_64'
3. error committing repository id: 'prefix-1'
  
Actual results:
error trying create repository with its relative path being a prefix of another repository relative path


Expected results:
One is either able to create a repository with its relative path being a prefix of another repository relative path or the Documentation should mention the relative path limitation

Additional info:
 - see the screen log attached

Comment 1 wes hayutin 2012-08-07 00:08:16 UTC
I recreated the issue with two custom repositories that use the same path.

custom repo1 = /path/unprotected
custom repo2 = /path/protected

It appears that pulp no longer accepts that. We should confirm that the pulp behavior has changed and catch and prompt the user to use a different path if this is the case.

Comment 2 wes hayutin 2012-08-07 00:11:04 UTC
[root@ip-10-70-90-96 ~]# pulp-admin repo create --id unprotected1 --name unprotected1 --relativepath /path1/
Successfully created repository [ unprotected1 ]

[root@ip-10-70-90-96 ~]# pulp-admin repo create --id protected1 --name protected1 --relativepath /path1/
error:  operation failed: PulpException: New relative path [path1] conflicts with existing relative path [path1]; paths may not be a parent or child directory of another relative path

Comment 3 wes hayutin 2012-08-07 00:12:20 UTC
A fix in rhui-manager will not be complicated, but confirming pulp's behavior is what we want/expect w/ slagle..

Comment 4 James Slagle 2012-08-09 13:04:14 UTC
Yes, looks like there's an existing bug in Pulp with how we check the relative path for collisions on repo creation.  

Seeing as this is not a regression at this point, I think this is something we can fix in a 2.1.1

Comment 5 mkovacik 2013-01-16 13:42:35 UTC
From QA POW: is the path-prefix issue a supported case?

Comment 6 James Slagle 2013-01-23 22:45:33 UTC
commit 4359bc8618e615fe20a284bad33151547d977a9f to github.com/splice/pulp

Comment 7 Vitaly Kuznetsov 2013-02-05 14:11:32 UTC
Created attachment 693384 [details]
Verification log

Comment 8 Vitaly Kuznetsov 2013-02-05 14:12:39 UTC
Verified in pulp-0.0.263-27.el6_3.noarch (RHUI 2.1.1)

Comment 10 errata-xmlrpc 2013-02-27 16:59:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0571.html


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