Issue #1973
closed
Repo symlinks are not removed after repository delete
Status:
CLOSED - CURRENTRELEASE
Target Release - Python:
1.1.2
Description
At publish time, symlinks are created for repositories in this directory:
`/var/lib/pulp/published/python/web`
When the repository is removed, a cleanup of this directory is attempted, but shutil.rmtree does not remove symlinks.
- Project changed from Pulp to Python Support
- Status changed from ASSIGNED to NEW
Steps to reproduce:
1. Create and sync a python repository
2. inspect `/var/lib/pulp/published/python/web`, you will see the repository name, which is a symlink.
3. Delete the repo
5. inspect `/var/lib/pulp/published/python/web` again, the symlink remains, but broken.
- Status changed from NEW to POST
- Triaged changed from No to Yes
- Platform Release set to 2.8.5
- Target Release - Python set to 1.1.2
- Platform Release changed from 2.8.5 to 2.8.6
- Status changed from POST to MODIFIED
- Platform Release changed from 2.8.6 to 2.8.5
- Status changed from MODIFIED to 5
verified
[root@qe-blade-08 ~]# rpm -qa pulp-server
pulp-server-2.8.5-0.1.beta.el7.noarch
[root@qe-blade-08 ~]# pulp-admin python repo create --repo-id pypi --feed https://pypi.python.org/ --package-names numpy,scipy
Repository [pypi] successfully created
[root@qe-blade-08 ~]# $ pulp-admin python repo sync run --repo-id pypi
-bash: $: command not found
[root@qe-blade-08 ~]# pulp-admin python repo sync run --repo-id pypi
+----------------------------------------------------------------------+
Synchronizing Repository [pypi]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading Python metadata.
[==================================================] 100%
2 of 2 items
... completed
Copying units already in pulp
[-]
... completed
Downloading and processing Python packages.
[==================================================] 100%
45 of 45 items
... completed
Task Succeeded
Publishing Python Metadata.
[-]
... completed
Publishing Python Content.
[-]
... completed
Making files available via web.
[-]
... completed
Task Succeeded
[root@qe-blade-08 ~]# ls /var/lib/pulp/published/python/web
pypi
[root@qe-blade-08 ~]# ls -l /var/lib/pulp/published/python/web
total 0
lrwxrwxrwx. 1 apache apache 61 Jun 21 10:39 pypi -> /var/lib/pulp/published/python/master/pypi/1466519954.09/pypi
[root@qe-blade-08 ~]#
[root@qe-blade-08 ~]#
[root@qe-blade-08 ~]#
[root@qe-blade-08 ~]# pulp-admin python repo delete --repo-id pypi
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Repository [pypi] successfully deleted
[root@qe-blade-08 ~]# ls -l /var/lib/pulp/published/python/web
total 0
[root@qe-blade-08 ~]#
- Status changed from 5 to 6
- Status changed from 6 to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
Merge pull request #81 from asmacdo/1973-cleanup-links
Remove published symlinks