Bug 664040 - distribution list url does not get updated if you change the relative path
Summary: distribution list url does not get updated if you change the relative path
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: Sprint 20
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-12-17 19:25 UTC by Preethi Thomas
Modified: 2011-08-16 13:59 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 13:59:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-12-17 19:25:57 UTC
Description of problem:

pulp-admin distribution url in distribution list doesn't get updated if you update the relative path of the repo after sync

1. create and sync a repo that has a distribution with a relativepath
2. now run distribution list
3. run repo update to change the relative path and sync again
4. run distribution list
5. See that the URL is still the same from before

Comment 1 Jeff Ortel 2011-02-03 17:15:50 UTC
The scope of this bug is really broader.   Changes to (--feed/--relativepath & --symlinks) need to be restricted.

The root problem is that pulp permits changes to the repo that affect where/how we store content & gpg keys.  In allowing this, the repo becomes broken because or content is orphaned.  The following limitations need to be imposed on 'repo update':

After the repo contains content (synced):
1) --symlinks : option rejected
2) --relativepath : option rejected
3) --feed : rejected if /path/ component of the URL has changed.

Not covered by these rules:

1) permitted changes to feed/relative path not reflected in pulp.repo
2) changes to gpg keys not reflected in pulp.repo.

Comment 2 Jay Dobies 2011-02-04 19:24:02 UTC
Fixed in 0.135.

Comment 3 Preethi Thomas 2011-02-08 19:32:10 UTC
fails_qa

Here is a scenario that is failing

1. Create a repo with feed and a relative path


[root@preethi pulp]#  pulp-admin repo create --id=pt-pulp --name=pt-pulp --arch=x86_64 --feed=yum:http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-14/x86_64/ --relativepath=/tmp/pt-repo/
Successfully created repository [ pt-pulp ]
2. Sync the repo 

[root@preethi pulp]#  pulp-admin repo sync --id=pt-pulp -FSync for repository pt-pulp started
Sync: Finished
0/11 new items downloaded
11/11 existing items processed

Item Details: 
Rpms: 11/11

3. run repo update with same relativepath from above

[root@preethi pulp]#  pulp-admin repo update --id=pt-pulp  --relativepath=/tmp/pt-repo/
Successfully updated repository [ pt-pulp ]

4. Now update it with a new relativepath

[root@preethi pulp]#  pulp-admin repo update --id=pt-pulp  --relativepath=/tmp/pt-repo/test
Successfully updated repository [ pt-pulp ]

Comment 4 Jeff Ortel 2011-02-08 22:19:51 UTC
Step 3 should have failed since the repo has content.  Running your exact scenario.

Comment 5 Jeff Ortel 2011-02-09 19:25:05 UTC
Nice edge case catch!  Looks like using --relativepath=<same value> and setting the value to be the same was storing the value with the leading and trailing (/) not stripped.

Commit: 579cba616c1e2bca4b15f75aa577bab795c0bf42

Comment 6 Jeff Ortel 2011-02-14 17:09:01 UTC
Build: 0.138

Comment 7 Preethi Thomas 2011-03-08 21:20:40 UTC
[root@nec-em8 upload]# rpm -q pulp
pulp-0.0.145-1


[root@nec-em8 upload]# pulp-admin -u admin -p admin repo create --id=pt-pulp --name=pt-pulp --arch=x86_64 --feed=yum:http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-14/x86_64/ --relativepath=/tmp/pt-repo/
Successfully created repository [ pt-pulp ]

[root@nec-em8 upload]# rpm -q pulp
pulp-0.0.145-1
[root@nec-em8 upload]# pulp-admin repo sync --id=pt-pulp -F
error: operation failed: Invalid SSL Certificate
[root@nec-em8 upload]# pulp-admin -u admin -p admin repo sync --id=pt-pulp -F
Sync for repository pt-pulp started
Sync: Finished
9/10 new items downloaded
1/10 existing items processed

Item Details: 
Rpms: 10/10

[root@nec-em8 upload]# 
[root@nec-em8 upload]# 
[root@nec-em8 upload]# 
[root@nec-em8 upload]# pulp-admin -u admin -p admin repo update --id=pt-pulp --relativepath=/tmp/pt-repo/
Successfully updated repository [ pt-pulp ]

[root@nec-em8 upload]# pulp-admin -u admin -p admin repo update --id=pt-pulp --relativepath=/tmp/pt-repo/test
error: operation failed: 
[root@nec-em8 upload]#

Comment 8 Preethi Thomas 2011-08-16 13:59:49 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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