Project

Profile

Help

Issue #1973

closed

Repo symlinks are not removed after repository delete

Added by amacdona@redhat.com almost 8 years ago. Updated almost 5 years 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.

Actions #1

Updated by amacdona@redhat.com almost 8 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.

Actions #2

Updated by amacdona@redhat.com almost 8 years ago

  • Status changed from NEW to POST
Actions #3

Updated by amacdona@redhat.com almost 8 years ago

  • Triaged changed from No to Yes

Added by Austin almost 8 years ago

Revision 2088adc7 | View on GitHub

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

Remove published symlinks

Actions #4

Updated by semyers almost 8 years ago

  • Platform Release set to 2.8.5
  • Target Release - Python set to 1.1.2
Actions #5

Updated by semyers almost 8 years ago

  • Platform Release changed from 2.8.5 to 2.8.6
Actions #6

Updated by semyers almost 8 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.

Actions #7

Updated by semyers almost 8 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by pthomas@redhat.com almost 8 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 ~]# 
Actions #9

Updated by pthomas@redhat.com almost 8 years ago

  • Status changed from 5 to 6
Actions #10

Updated by semyers almost 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF