Bug 1183784
Summary: | On sync and delete, relative urls conflict with relative urls of deleted repos | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Irina Gulina <igulina> |
Component: | z_other | Assignee: | amacdona <austin> |
Status: | CLOSED UPSTREAM | QA Contact: | pulp-qe-list |
Severity: | low | Docs Contact: | |
Priority: | high | ||
Version: | unspecified | CC: | austin, mhrivnak, pthomas, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-28 23:20:29 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Irina Gulina
2015-01-19 19:48:33 UTC
I checked this on rhel7 & rhel6 On Rhel7 it works fine [root@cloud-qe-4 ~]# pulp-admin rpm repo create --repo-id zoo_1 --feed file:///var/lib/pulp/published/yum/master/yum_distributor/zoo/ Successfully created repository [zoo_1] [root@cloud-qe-4 ~]# [root@cloud-qe-4 ~]# [root@cloud-qe-4 ~]# pulp-admin rpm repo sync run --repo-id zoo_1+----------------------------------------------------------------------+ Synchronizing Repository [zoo_1] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [-] ... failed [Errno 2] No such file or directory: u'///var/lib/pulp/published/yum/master/yum_distributor/zoo/repodata/repomd.xml' Task Failed Importer indicated a failed response [root@cloud-qe-4 ~]# pulp-admin rpm repo delete --repo-id zoo_1 This command may be exited via ctrl+c without affecting the request. [\] Running... Repository [zoo_1] successfully deleted [root@cloud-qe-4 ~]# And on Rhel6 I was able to reproduce the error. [root@gizmo ~]# pulp-admin rpm repo sync run --repo-id epel5_2 +----------------------------------------------------------------------+ Synchronizing Repository [epel5_2] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [-] ... failed [Errno 2] No such file or directory: u'//var/lib/pulp/published/yum/master/yum_distributor/epel5/repodata/repomd.xml' Task Failed Importer indicated a failed response [root@gizmo ~]# pulp-admin rpm repo list Warning: path should have mode 0700 because it may contain sensitive information: /root/.pulp/ +----------------------------------------------------------------------+ RPM Repositories +----------------------------------------------------------------------+ Id: upload Display Name: upload Description: None Content Unit Counts: Rpm: 9 Id: rhel7 Display Name: rhel7 Description: None Content Unit Counts: Erratum: 176 Package Category: 9 Package Environment: 6 Package Group: 70 Rpm: 5270 Yum Repo Metadata File: 1 Id: zoo Display Name: zoo Description: None Content Unit Counts: Erratum: 4 Package Category: 1 Package Group: 2 Rpm: 32 Id: epel5 Display Name: epel5 Description: None Content Unit Counts: Erratum: 1948 Package Category: 5 Package Group: 36 Rpm: 6674 Yum Repo Metadata File: 1 Id: epel5_2 Display Name: epel5_2 Description: None Content Unit Counts: [root@gizmo ~]# pulp-admin rpm repo delete --repo-id epel5_2 Warning: path should have mode 0700 because it may contain sensitive information: /root/.pulp/ This command may be exited via ctrl+c without affecting the request. [\] Running... Task Failed Pulp exception occurred: PulpExecutionException [root@gizmo ~]# I was unable to replicate this on RHEL6 using the zoo repo. Looking over the comments, I notice that all the failures occurred while syncing the epel5 repo. I think the failures only occurred with feeds that are not valid yum repositories at all. If I'm reading this correctly, I'd expect you could reproduce this even with --feed=http://slashdot.org Austin, in my case it was syncing of epel6 (see my bug description), for Preethi it was epel5 (her comment #1), and I also wasn't able to reproduce it for local zoo repo on rh6, but with some other bad feed on https there is the same Exception on delete repo: >> rpm -qa pulp-server pulp-server-2.6.0-0.5.beta.el6.noarch >> pulp-admin rpm repo create --repo-id zoo_2 --feed file:///var/lib/pulp/published/yum/master/yum_distributor/zoo/ Successfully created repository [zoo_2] >> pulp-admin rpm repo sync run --repo-id zoo_2 +----------------------------------------------------------------------+ Synchronizing Repository [zoo_2] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [-] ... failed [Errno 2] No such file or directory: u'///var/lib/pulp/published/yum/master/yum_distributor/zoo/repodata/repomd.xml' Task Failed Importer indicated a failed response >> pulp-admin rpm repo delete --repo-id zoo_2 This command may be exited via ctrl+c without affecting the request. [\] Running... Repository [zoo_2] successfully deleted >> pulp-admin rpm repo create --repo-id no_repodata_repo --feed https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/ Successfully created repository [no_repodata_repo] >> pulp-admin rpm repo sync run --repo-id no_repodata_repo +----------------------------------------------------------------------+ Synchronizing Repository [no_repodata_repo] +----------------------------------------------------------------------+ This command may be exited via ctrl+c without affecting the request. Downloading metadata... [\] ... failed Not Found Task Failed Importer indicated a failed response >> pulp-admin rpm repo delete --repo-id no_repodata_repo This command may be exited via ctrl+c without affecting the request. [\] Running... Task Failed Pulp exception occurred: PulpExecutionException >> pulp-admin rpm repo delete --repo-id no_repodata_repo Repository [no_repodata_repo] does not exist on the server I was able to reproduce in fedora and RHEL. This bug is a result of not cleaning up /var/lib/pulp/published/yum/ directory when a repo is deleted. This allows the relative path of a new repo to conflict with the relative url of deleted repos. Steps to replicate: 1. Create, sync, and delete a repo with a relative feed without specifying a relative url. 2. Create a repo, again without a relative url, that has a feed that is a sub-url of the original repo. 3. $ pulp-admin rpm repo delete --repo-id=fail Expected Result: Repository [fail] successfully deleted Actual Result: Task Failed Pulp exception occurred: PulpExecutionException Since this one is weird, here's a script! $ cat 1183784.sh pulp-admin rpm repo create --repo-id=zoo --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo pulp-admin rpm repo sync run --repo-id=zoo pulp-admin rpm repo delete --repo-id=zoo pulp-admin rpm repo create --repo-id=fail --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/ pulp-admin rpm repo delete --repo-id=fail Two things need to be fixed with this one: 1. When a repo is deleted, the directory structure in /var/lib/pulp/published/yum/ should be removed. 2. To makeWhen a repo is created, the relative url validation should validate against the directory structure. *** Bug 1188406 has been marked as a duplicate of this bug. *** Moved to https://pulp.plan.io/issues/671 |