Project

Profile

Help

Issue #1973

Repo symlinks are not removed after repository delete

Added by amacdona@redhat.com over 4 years ago. Updated over 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Python:
Platform Release:
2.8.5
Target Release - Python:
1.1.2
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:

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.

Associated revisions

Revision 2088adc7 View on GitHub
Added by Austin over 4 years ago

Merge pull request #81 from asmacdo/1973-cleanup-links

Remove published symlinks

History

#1 Updated by amacdona@redhat.com over 4 years ago

  • 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.

#2 Updated by amacdona@redhat.com over 4 years ago

  • Status changed from NEW to POST

#3 Updated by amacdona@redhat.com over 4 years ago

  • Triaged changed from No to Yes

#4 Updated by semyers over 4 years ago

  • Platform Release set to 2.8.5
  • Target Release - Python set to 1.1.2

#5 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.5 to 2.8.6

#6 Updated by semyers over 4 years ago

  • Status changed from POST to MODIFIED
  • Platform Release changed from 2.8.6 to 2.8.5

This went MODIFIED with https://github.com/pulp/pulp_python/pull/81, and is included in 2.8.5.

I'll fix up the issue ref in redmine in a moment.

#7 Updated by semyers over 4 years ago

  • Status changed from MODIFIED to 5

#8 Updated by pthomas@redhat.com over 4 years ago

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 ~]# 

#9 Updated by pthomas@redhat.com over 4 years ago

  • Status changed from 5 to 6

#10 Updated by semyers over 4 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF