Bug 845941 - Custom repository relative path prefix collision
Custom repository relative path prefix collision
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA (Show other bugs)
2.1
Unspecified Unspecified
high Severity unspecified
: ---
: 2.1.1
Assigned To: James Slagle
mkovacik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 04:07 EDT by mkovacik
Modified: 2013-02-27 11:59 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-27 11:59:19 EST
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)
Screen log (19.65 KB, text/plain)
2012-08-06 04:07 EDT, mkovacik
no flags Details
Verification log (6.16 KB, text/plain)
2013-02-05 09:11 EST, Vitaly Kuznetsov
no flags Details

  None (edit)
Description mkovacik 2012-08-06 04:07:07 EDT
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-06 20:08:16 EDT
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-06 20:11:04 EDT
[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-06 20:12:20 EDT
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 09:04:14 EDT
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 08:42:35 EST
From QA POW: is the path-prefix issue a supported case?
Comment 6 James Slagle 2013-01-23 17:45:33 EST
commit 4359bc8618e615fe20a284bad33151547d977a9f to github.com/splice/pulp
Comment 7 Vitaly Kuznetsov 2013-02-05 09:11:32 EST
Created attachment 693384 [details]
Verification log
Comment 8 Vitaly Kuznetsov 2013-02-05 09:12:39 EST
Verified in pulp-0.0.263-27.el6_3.noarch (RHUI 2.1.1)
Comment 10 errata-xmlrpc 2013-02-27 11:59:19 EST
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.