Project

Profile

Help

Issue #1607

closed

Puppet install distributor fails when deleting repository if not published

Added by jsherril@redhat.com about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Master
Platform Release:
2.8.1
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

This PR: https://github.com/pulp/pulp_puppet/pull/187 seems to not handle when the directory does not exist.

If you create a repo with the puppet install distributor to it and try to delete the repo, pulp will error:

raceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/pulp/server/controllers/repository.py", line 515, 

   dist_controller.delete(distributor.repo_id, distributor.distributor_id)
 File "/usr/lib/python2.7/site-packages/celery/local.py", line 167, in <lambda>
   __call__ = lambda x, *a, **kw: x._get_current_object()(*a, **kw)
 File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 473, in __call__
   return super(Task, self).__call__(*args, **kwargs)
 File "/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py", line 103, in __call__
   return super(PulpTask, self).__call__(*args, **kwargs)
 File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_cal

   return orig(self, *args, **kwargs)
 File "/usr/lib/python2.7/site-packages/celery/app/task.py", line 420, in __call__
   return self.run(*args, **kwargs)
 File "/usr/lib/python2.7/site-packages/pulp/server/controllers/distributor.py", line 133,

   dist_instance.distributor_removed(repo.to_transfer_repo(), call_config)
 File "/usr/lib/python2.7/site-packages/pulp_puppet/plugins/distributors/installdistributo

   shutil.rmtree(destination)
 File "/usr/lib64/python2.7/shutil.py", line 239, in rmtree
   onerror(os.listdir, path, sys.exc_info())
 File "/usr/lib64/python2.7/shutil.py", line 237, in rmtree
   names = os.listdir(path)
SError: [Errno 2] No such file or directory: '/var/lib/pulp/published/puppet_katello_test'

If you first publish it, it seems to delete just fine


Related issues

Has duplicate Puppet Support - Issue #1777: Repo removal fails with "No such file or directory"CLOSED - DUPLICATEipanova@redhat.comActions

Also available in: Atom PDF