Project

Profile

Help

Issue #3524

closed

Changeset exception during sync

Added by daviddavis over 6 years ago. Updated almost 5 years ago.

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

Description

In pulp_ansible, we have role versions and we're seeing the error below when the code hits dupe artifacts. The problem is that the artifact_q filter is empty:

https://github.com/pulp/pulp/blob/3.0-dev/plugin/pulpcore/plugin/changeset/model.py#L376-L381

I think this doesn't happen for pulp_file because we're able to set the digests on the artifacts:

https://github.com/pulp/pulp_file/blob/master/pulp_file/app/tasks/synchronizing.py#L161

This digest info comes from the metadata and in pulp_ansible's metadata, we don't have any digest info for artifacts.

Mar 23 19:12:00 pulp3.dev celery[2413]: Traceback (most recent call last):
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 374, in trace_task
Mar 23 19:12:00 pulp3.dev celery[2413]:     R = retval = fun(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/pulpcore/pulpcore/tasking/tasks.py", line 273, in __call__
Mar 23 19:12:00 pulp3.dev celery[2413]:     return super().__call__(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/celery/app/trace.py", line 629, in __protected_call__
Mar 23 19:12:00 pulp3.dev celery[2413]:     return self.run(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp_ansible/pulp_ansible/app/tasks/synchronizing.py", line 80, in synchronize
Mar 23 19:12:00 pulp3.dev celery[2413]:     for report in changeset.apply():
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/main.py", line 196, in apply
Mar 23 19:12:00 pulp3.dev celery[2413]:     for report in itertools.chain(self._apply_additions(), self._apply_removals()):
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/main.py", line 151, in _apply_additions
Mar 23 19:12:00 pulp3.dev celery[2413]:     content.settle()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 189, in settle
Mar 23 19:12:00 pulp3.dev celery[2413]:     self.save()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 210, in save
Mar 23 19:12:00 pulp3.dev celery[2413]:     artifact.save()
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/devel/pulp/plugin/pulpcore/plugin/changeset/model.py", line 381, in save
Mar 23 19:12:00 pulp3.dev celery[2413]:     self._stored_model = Artifact.objects.get(q)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/manager.py", line 85, in manager_method
Mar 23 19:12:00 pulp3.dev celery[2413]:     return getattr(self.get_queryset(), name)(*args, **kwargs)
Mar 23 19:12:00 pulp3.dev celery[2413]:   File "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/django/db/models/query.py", line 384, in get
Mar 23 19:12:00 pulp3.dev celery[2413]:     (self.model._meta.object_name, num)
Mar 23 19:12:00 pulp3.dev celery[2413]: pulpcore.app.models.content.MultipleObjectsReturned: get() returned more than one Artifact -- it returned 70!

Also available in: Atom PDF