Project

Profile

Help

Issue #3524

closed

Changeset exception during sync

Added by daviddavis over 6 years ago. Updated about 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!
Actions #1

Updated by daviddavis over 6 years ago

  • Description updated (diff)

FYI, this is a blocker for pulp_ansible and probably other plugins as well.

Actions #2

Updated by daviddavis over 6 years ago

  • Description updated (diff)
Actions #3

Updated by dalley over 6 years ago

  • Triaged changed from No to Yes

Added by jortel@redhat.com over 6 years ago

Revision 0e55d183 | View on GitHub

Prevent query matching all content/artifact when not criteria included in the Q. closes #3524

Added by jortel@redhat.com over 6 years ago

Revision 0e55d183 | View on GitHub

Prevent query matching all content/artifact when not criteria included in the Q. closes #3524

Actions #4

Updated by jortel@redhat.com over 6 years ago

  • Status changed from NEW to POST
  • Assignee set to jortel@redhat.com
  • Sprint set to Sprint 35
Actions #5

Updated by jortel@redhat.com over 6 years ago

  • Status changed from POST to MODIFIED
Actions #6

Updated by dkliban@redhat.com over 6 years ago

  • Sprint/Milestone set to 3.0.0
Actions #7

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3, Pulp 3 MVP)
Actions #8

Updated by bmbouter about 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF