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
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.
Fixed in 0.135.
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 ]
Step 3 should have failed since the repo has content. Running your exact scenario.
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
Build: 0.138
[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]#
Closing with Community Release 15 pulp-0.0.223-4.