Project

Profile

Help

Issue #7096

closed

Deleting a repository with a kickstart raises exception

Added by mathiasdasilva over 4 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 77
Quarter:

Description

Hi,

Seems there is an issue when i try to delete a Centos repository :

Jul 07 06:52:44 XXXX rq[1171]: pulp: rq.worker:ERROR: django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Repository' because they are referenced through a protected foreign key: 'Variant.repository'", <QuerySet [<Variant: CentOS>]>) Jul 07 06:52:44 XXXX rq[1171]: Traceback (most recent call last): Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py", line 883, in perform_job Jul 07 06:52:44 XXXX rq[1171]: rv = job.perform() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 657, in perform Jul 07 06:52:44 XXXX rq[1171]: self._result = self._execute() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 663, in _execute Jul 07 06:52:44 XXXX rq[1171]: return self.func(*self.args, **self.kwargs) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/app/tasks/base.py", line 91, in general_delete Jul 07 06:52:44 XXXX rq[1171]: instance.delete() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 918, in delete Jul 07 06:52:44 XXXX rq[1171]: collector.collect([self], keep_parents=keep_parents) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/deletion.py", line 224, in collect Jul 07 06:52:44 XXXX rq[1171]: field.remote_field.on_delete(self, field, sub_objs, self.using) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/deletion.py", line 27, in PROTECT Jul 07 06:52:44 XXXX rq[1171]: sub_objs Jul 07 06:52:44 XXXX rq[1171]: django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Repository' because they are referenced through a protected foreign key: 'Variant.repository'", <QuerySet [<Variant: CentOS>]>) Jul 07 06:52:44 XXXX rq[1171]: Traceback (most recent call last): Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py", line 883, in perform_job Jul 07 06:52:44 XXXX rq[1171]: rv = job.perform() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 657, in perform Jul 07 06:52:44 XXXX rq[1171]: self._result = self._execute() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py", line 663, in _execute Jul 07 06:52:44 XXXX rq[1171]: return self.func(*self.args, **self.kwargs) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/app/tasks/base.py", line 91, in general_delete Jul 07 06:52:44 XXXX rq[1171]: instance.delete() Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/base.py", line 918, in delete Jul 07 06:52:44 XXXX rq[1171]: collector.collect([self], keep_parents=keep_parents) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/deletion.py", line 224, in collect Jul 07 06:52:44 XXXX rq[1171]: field.remote_field.on_delete(self, field, sub_objs, self.using) Jul 07 06:52:44 XXXX rq[1171]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/django/db/models/deletion.py", line 27, in PROTECT Jul 07 06:52:44 XXXX rq[1171]: sub_objs Jul 07 06:52:44 XXXX rq[1171]: django.db.models.deletion.ProtectedError: ("Cannot delete some instances of model 'Repository' because they are referenced through a protected foreign key: 'Variant.repository'", <QuerySet [<Variant: CentOS>]>) Jul 07 06:52:44 XXXX rq[1171]: pulp: rq.worker:INFO: : 8ea8c7f4-32a9-4fea-a775-0129295c9605 Jul 07 06:52:44 XXXX rq[1171]: pulp: rq.worker:INFO: : Job OK (8ea8c7f4-32a9-4fea-a775-0129295c9605)

Also available in: Atom PDF