Actions
Issue #1096
closedDeleting an OSTree repo results in a TypeError on the server
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - OSTree:
master
Platform Release:
Target Release - OSTree:
1.0.0
OS:
Fedora 21
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
It looks like shutil.rmtree is being given a None path during cleanup which makes it unhappy.
[vagrant@pulp-devel packaging]$ pulp-admin ostree repo create --repo-id test
Repository [test] successfully created
[vagrant@pulp-devel packaging]$ pulp-admin ostree repo delete --repo-id test
This command may be exited via ctrl+c without affecting the request.
[\]
Running...
Task Failed
Pulp exception occurred: PulpExecutionException
coercing to Unicode: need string or buffer, NoneType found
The traceback:
Jun 30 11:01:08 pulp-devel pulp[3576]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._queue_reserved_task[0fec9e48-94dc-4308-9160-fc0144d43b1d]
Jun 30 11:01:08 pulp-devel pulp[3586]: kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.strategy:INFO: Received task: pulp.server.tasks.repository.delete[85368c8c-82fb-41c0-b609-7d56319bb243]
Jun 30 11:01:08 pulp-devel pulp[3576]: celery.worker.job:INFO: Task pulp.server.async.tasks._queue_reserved_task[0fec9e48-94dc-4308-9160-fc0144d43b1d] succeeded in 0.0411388439998s: None
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[9be7fb59-7554-48e9-9903-b6b41f68e259]
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) Error received removing distributor [ostree_web_distributor_name_cli] from repo [test]
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) Traceback (most recent call last):
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/cud.py", line 226, in delete_repo
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) distributor_manager.remove_distributor(repo_id, repo_distributor['id'])
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/distributor.py", line 243, in remove_distributor
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) distributor_instance.distributor_removed(transfer_repo, call_config)
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) File "/home/vagrant/devel/pulp_ostree/plugins/pulp_ostree/plugins/distributors/web.py", line 126, in distributor_removed
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) shutil.rmtree(repo_dir, ignore_errors=True)
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) File "/usr/lib64/python2.7/shutil.py", line 228, in rmtree
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) if os.path.islink(path):
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) File "/usr/lib64/python2.7/posixpath.py", line 142, in islink
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) st = os.lstat(path)
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.managers.repo.cud:ERROR: (3571-23712) TypeError: coercing to Unicode: need string or buffer, NoneType found
Jun 30 11:01:08 pulp-devel pulp[3571]: pulp.server.async.tasks:INFO: Task failed : [85368c8c-82fb-41c0-b609-7d56319bb243]
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) Task pulp.server.tasks.repository.delete[85368c8c-82fb-41c0-b609-7d56319bb243] raised unexpected: PulpExecutionException()
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) Traceback (most recent call last):
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) R = retval = fun(*args, **kwargs)
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 394, in __call__
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) return super(Task, self).__call__(*args, **kwargs)
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 437, in __protected_call__
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) return self.run(*args, **kwargs)
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) File "/home/vagrant/devel/pulp/server/pulp/server/tasks/repository.py", line 41, in delete
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) manager.delete_repo(repo_id)
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) File "/home/vagrant/devel/pulp/server/pulp/server/managers/repo/cud.py", line 261, in delete_repo
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) raise pe
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:ERROR: (3438-23712) PulpExecutionException: Pulp exception occurred: PulpExecutionException
Jun 30 11:01:08 pulp-devel pulp[3438]: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[9be7fb59-7554-48e9-9903-b6b41f68e259] succeeded in 0.00358568199999s: None
Related issues
Actions
Deleting an OSTree repo results in a TypeError on the server.
closes #1096 https://pulp.plan.io/issues/1096