Actions
Issue #1607
closedPuppet install distributor fails when deleting repository if not published
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
Actions
Stop re-raising exceptions during the removal of install_path
https://pulp.plan.io/issues/1607 closes #1607