Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionTanya Tereshchenko
2021-10-12 15:11:08 UTC
Description of problem:
CV publish fails if it happen to contain multiple advisories with the same errata_id but different otherwise.
Version-Release number of selected component (if applicable):
6.10.0 snap 22
Steps to Reproduce (copied from BZ#1986356#c1, since QE ran into this issue using those steps, see BZ#1986356#c41)
- sync a repo (e.g. RH SCL, not a huge one but big enough to see the sequential activity that can be paralelised)
- create several CVs with that repo, e.g. with include filters (just to differentiate the CVs, not required, though); below are hammer commands for it (repo id is 4, customise it if required):
content-view create --name CV_SCL_filter_no_include_2020-01-01 --organization-id=1 --repository-ids=4 --solve-dependencies=no
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-01-01 --name=include_base --inclusion=true --original-packages=true --type=rpm
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-01-01 --name=include_errata --inclusion=true --type=erratum
content-view filter rule create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-01-01 --content-view-filter=include_errata --date-type='updated' --end-date='2020-01-01'
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-01-01 --name=include_modules --inclusion=true --original-module-streams=true --type=modulemd
content-view create --name CV_SCL_filter_no_include_2020-04-01 --organization-id=1 --repository-ids=4 --solve-dependencies=no
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-04-01 --name=include_base --inclusion=true --original-packages=true --type=rpm
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-04-01 --name=include_errata --inclusion=true --type=erratum
content-view filter rule create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-04-01 --content-view-filter=include_errata --date-type='updated' --end-date='2020-04-01'
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-04-01 --name=include_modules --inclusion=true --original-module-streams=true --type=modulemd
content-view create --name CV_SCL_filter_no_include_2020-07-01 --organization-id=1 --repository-ids=4 --solve-dependencies=no
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-07-01 --name=include_base --inclusion=true --original-packages=true --type=rpm
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-07-01 --name=include_errata --inclusion=true --type=erratum
content-view filter rule create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-07-01 --content-view-filter=include_errata --date-type='updated' --end-date='2020-07-01'
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-07-01 --name=include_modules --inclusion=true --original-module-streams=true --type=modulemd
content-view create --name CV_SCL_filter_no_include_2020-10-01 --organization-id=1 --repository-ids=4 --solve-dependencies=no
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-10-01 --name=include_base --inclusion=true --original-packages=true --type=rpm
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-10-01 --name=include_errata --inclusion=true --type=erratum
content-view filter rule create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-10-01 --content-view-filter=include_errata --date-type='updated' --end-date='2020-10-01'
content-view filter create --organization-id=1 --content-view=CV_SCL_filter_no_include_2020-10-01 --name=include_modules --inclusion=true --original-module-streams=true --type=modulemd
content-view publish --name=CV_SCL_filter_no_include_2020-01-01 --organization-id=1 --async
content-view publish --name=CV_SCL_filter_no_include_2020-04-01 --organization-id=1 --async
content-view publish --name=CV_SCL_filter_no_include_2020-07-01 --organization-id=1 --async
content-view publish --name=CV_SCL_filter_no_include_2020-10-01 --organization-id=1 --async
Actual results:
Errors with "get() returned more than one UpdateRecord -- it returned 2!`"
pulp [59cc0e4d-b1d3-4e83-be25-a010e9413044]: pulpcore.tasking.pulpcore_worker:INFO: Task 1584fe74-28d1-4d63-9710-b1b4e36a6e1c failed (get() returned more than one UpdateRecord -- it returned 2!)
pulp [59cc0e4d-b1d3-4e83-be25-a010e9413044]: pulpcore.tasking.pulpcore_worker:INFO: File "/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py", line 317, in _perform_task
result = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pulpcore/app/tasks/repository.py", line 219, in add_and_remove
new_version.add_content(models.Content.objects.filter(pk__in=add_content_units))
File "/usr/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 963, in __exit__
repository.finalize_new_version(self)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/models/repository.py", line 353, in finalize_new_version
resolve_advisories(new_version, previous_version)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/advisory.py", line 87, in resolve_advisories
previous_advisory = previous_advisories.get(id=advisory_id)
File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 412, in get
(self.model._meta.object_name, num)
pulp [59cc0e4d-b1d3-4e83-be25-a010e9413044]: pulpcore.tasking.pulpcore_worker:INFO: Task e9a64af6-047f-48d6-825d-48108e9e3c26 failed (get() returned more than one UpdateRecord -- it returned 2!)
pulp [59cc0e4d-b1d3-4e83-be25-a010e9413044]: pulpcore.tasking.pulpcore_worker:INFO: File "/usr/lib/python3.6/site-packages/pulpcore/tasking/pulpcore_worker.py", line 317, in _perform_task
result = func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pulpcore/app/tasks/repository.py", line 219, in add_and_remove
new_version.add_content(models.Content.objects.filter(pk__in=add_content_units))
File "/usr/lib/python3.6/site-packages/pulpcore/app/models/repository.py", line 963, in __exit__
repository.finalize_new_version(self)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/models/repository.py", line 353, in finalize_new_version
resolve_advisories(new_version, previous_version)
File "/usr/lib/python3.6/site-packages/pulp_rpm/app/advisory.py", line 88, in resolve_advisories
added_advisory = UpdateRecord.objects.get(id=advisory_id, pk__in=added_advisory_pks)
File "/usr/lib/python3.6/site-packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 412, in get
(self.model._meta.object_name, num)
Expected results:
No errors
Additional info:
See related convo BZ#1986356#c41
Comment 2pulp-infra@redhat.com
2021-10-12 16:11:26 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 3pulp-infra@redhat.com
2021-10-12 16:11:27 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 6pulp-infra@redhat.com
2021-10-13 22:08:13 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Satellite 6.10.1 Async Bug Fix Update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2021:4737