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.

Bug 2032843

Summary: pulp3: 2to3 migration fails with Katello::Errors::Pulp3Error: the cursor "_django_curs_XXXX_XXXX" does not exist
Product: Red Hat Satellite Reporter: Ahmed Eladawy <aeladawy>
Component: InstallationAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Omkar Khatavkar <okhatavk>
Severity: high Docs Contact:
Priority: high    
Version: 6.9.7CC: ahumbe, dkliban, gscarbor, jkrajice, jsherril, ktordeur, osousa, saydas, smajumda
Target Milestone: 6.9.9Keywords: PrioBumpGSS, Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-installer-2.3.1.22-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-20 20:34:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ahmed Eladawy 2021-12-15 10:51:55 UTC
Description of problem:

pulp3: 2to3 migration fails with Katello::Errors::Pulp3Error: the cursor "_django_curs_XXXX_XXXX" does not exist

Version-Release number of selected component (if applicable):

Satellite 6.9.7-1

How reproducible:

Can not be reproduced on test satellite.

Steps to Reproduce:
1. Run the content prepare command :

# satellite-maintain content prepare


Actual results:

Katello::Errors::Pulp3Error
ERROR: the cursor "_django_curs_140359969285952_24293" does not exist



Additional info:

pulp_tasks:
- pulp_href: "/pulp/api/v3/tasks/9c8e07cc-6085-4033-a19f-deeffc0cb3e3/"
  pulp_created: '2021-12-14T12:42:05.787+00:00'
  state: failed
  name: pulp_2to3_migration.app.tasks.migrate.migrate_from_pulp2
  started_at: '2021-12-14T12:42:05.968+00:00'
  finished_at: '2021-12-14T13:17:04.959+00:00'
  error:
    traceback: |2
        File "/usr/lib/python3.6/site-packages/rq/worker.py", line 936, in perform_job
          rv = job.perform()
        File "/usr/lib/python3.6/site-packages/rq/job.py", line 684, in perform
          self._result = self._execute()
        File "/usr/lib/python3.6/site-packages/rq/job.py", line 690, in _execute
          return self.func(*self.args, **self.kwargs)
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/tasks/migrate.py", line 81, in migrate_from_pulp2
          migrate_content(plan, skip_corrupted=skip_corrupted)
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/migration.py", line 55, in migrate_content
          plugin.migrator.migrate_content_to_pulp3(skip_corrupted=skip_corrupted)
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/rpm/migrator.py", line 150, in migrate_content_to_pulp3
          loop.run_until_complete(dm.create())
        File "/usr/lib64/python3.6/asyncio/base_events.py", line 484, in run_until_complete
          return future.result()
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 89, in create
          await pipeline
        File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 225, in create_pipeline
          await asyncio.gather(*futures)
        File "/usr/lib/python3.6/site-packages/pulpcore/plugin/stages/api.py", line 43, in __call__
          await self.run()
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 181, in run
          self.migrate_to_pulp3(cmodel, ctype)
        File "/usr/lib/python3.6/site-packages/pulp_2to3_migration/app/plugin/content.py", line 249, in migrate_to_pulp3
          for pulp_2to3_detail_content in pulp_2to3_detail_qs.iterator(chunk_size=800):
        File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 341, in _iterator
          yield from self._iterable_class(self, chunked_fetch=use_chunked_fetch, chunk_size=chunk_size)
        File "/usr/lib/python3.6/site-packages/django/db/models/query.py", line 55, in __iter__
          results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
        File "/usr/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 1145, in execute_sql
          cursor.close()
    description: ERROR: the cursor "_django_curs_140359969285952_24293" does not exist

Comment 9 errata-xmlrpc 2022-04-20 20:34:53 UTC
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 (Important: Satellite 6.9.9 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/RHSA-2022:1478