Failed Import Content View Version

Problem:

Error while importing an Ubuntu 24.04 content view export containing releases noble, noble-updates, noble-back ports, noble-proposed and noble-security (about 158k deb packages) on an air gaped machine.

Error Message: sending query and params failed: number of parameters must be between 0 and 65535

Expected outcome:

Successful Imported Content View

Foreman and Proxy versions:

Foreman 3.17 with Katello 4.19

Foreman and Proxy plugin versions:

Distribution and version:

Oracle Linux 9.7

Other relevant data:

We use content views to export them and then import them back into an air gaped network.

First we need some more information: Can you post the exact procedure of commands that you use for both exporting and importing? Are you using incremental export/import or is this on a fresh full export/import? What is the full error from the logs?

Sorry for late reply.

I’ve noticed the same issue on Oracle Linux 9 including baseos, appstream, uekr7, uekr8 and epel repositories. So it doesn’t seem to be limited to just deb or rpm packages.

  1. I created products Ubuntu 24 / Oracle Linux 9 with all the mentioned repositories.
  2. I created content views for Ubuntu / Oracle Linux with all the mentioned repositories.
  3. I created an export of the content views.
hammer content-export complete version –organization=ORG –content-view=”Ubuntu_24” –version=1.0 –chunk-size=1
  1. I transferred the export to destination server.
  2. I did a content view import.
hammer content-import version --organization=ORG --path=/var/lib/pulp/imports/ORG/Ubuntu_24/1.0/2026-04-10T10-00-00-00/

Error log:

File /usr/lib/python3.12/site-packages/pulpcore/tasking/tasks.py", line 94, in _execute_task 
	func (*args, **kwargs)
File "/usr/lib64/python3.12/contextlib.py", line 81, in inner 
	return func(*args, **kwds)
         ^^^^^^^^^^^^^^^^^^^^^^^^
File */usr/lib/python3.12/site-packages/pulp_deb/app/tasks/copy.py", line 120, in copy_content
	content_to_copy = find_structured_publish_content(content_to_copy, source_repo_version)
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/Lib/python3.12/site-packages/pulp_deb/app/tasks/copy.py", line 45, in find_structured_publish_content 
	for prc in pre_qs. select_related(" release_component"). iterator() :
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/lib/python3.12/site-packages/django/db/models/query.py", line 518, in _iterator 
	yield from iterable
File /usr/lib/python3.12/site-packages/django/db/models/query.py", line 93, in _iter_
	results = compiler.execute_sql(
                       ^^^^^^^^^^^^^^^^^^^^
File */usr/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1562, in execute_sql
cursor-execute(sql, params)
File "/usr/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute 
	return self._execute_with_wrappers(
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
	return executor(sql, params, many, context)
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/django/db/backends/utils.py”, line 84, in _execute
	with self.db. wrap_database_errors:
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File /usr/Lib/python3.12/site-packages/django/db/utils.py", line 91, in _exit_ 
	raise dj_exc_value.with_traceback(traceback) from exc_value
File /usr/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute 
	return self. cursor.execute(sql, params)
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/psycopg/_server_cursor.py", line 98, in execute 
	raise ex. with_traceback(None)
description: ‘sending query and params failed: number of parameters must be between 0 and 65535’

These symptoms sound exactly like Export of large amount of packages will result in errors · Issue #5375 · pulp/pulpcore · GitHub.

However, that issue was fixed way back in pulpcore 3.55.0 (and also backported to 3.49.10 and 3.39.15). So maybe a regression in pulpcore.

@autojo Do you know if this was working before you upgraded to Katello 4.19 (in case you upgraded from an earlier version)? The reason I ask is that Katello 4.19 upgrades from pulpcore 3.73 to 3.85, so if it is a regression that would establish a window for where the regression was introduced.

Note: pulpcore Issue #5375 had the same error, but on the export command, not as described here on the import command.

Yes, I’ve already seen these posts. I think it’s related, but there was a fix for the problem. So I thought it might be caused by something else in the export/import functions.

It was a fresh installation of this version, not an update.
The export completed without any errors.

I’m pretty sure that everything worked correctly with Katello 4.16 and pulpcore 3.63.

Is this only occurring with Debian content? Or RPM as well? If you’ve hit the error with other Pulp plugins, seeing their tracebacks would be helpful. I think it’s a good time to write up an issue (or issues) to Pulp.

I know the traceback above relates to Debian content because of /usr/Lib/python3.12/site-packages/pulp_deb/, so if it failed for other content types, I’d be looking for stack traces with the other plugin paths.

I’m on vacation right now and will be back in two weeks, so I’ll be able to give you an answer then. But I was pretty sure that the error also occurred with RPM packages (RHEL + Oracle Linux).

I found an old task. Instead of ../pulp_deb/…, the stack trace shows ../pulp_rpm/..

We have a test case for Full Text Bug Listing (with 100k files) and I it’s passing in stream (katello 4.21.0 and pulpcore 3.85.15).

This one might more deb-related - looking at the trace this one originates in pulp_deb while the previous one originated in pulpcore (already on export).

So am I understanding this correctly: Your test case exports 100k files (pulp_file or pulp_rpm based?) to test for regression of the bug you posted, this test case performs both export and import, and everything passes?

Yup, it’s this case: robottelo/tests/foreman/cli/test_satellitesync.py at master · SatelliteQE/robottelo · GitHub
And it uses this file-type repo: https://github.com/SatelliteQE/fedorapeople-repos/tree/master/file_perf

I updated to Foreman 3.18.1 and Katello 4.20.0 with Pulpcore 3.85.13 and followed the same procedure to create a new export using the new version. So far I have only tested it with Oracle Linux 9, and the issue is still there. The error occurs when importing the content view, while exporting works without any issues.

In my Oracle Linux 9 content view are 87817 packages and 23540 errata (don’t know if it matters)

We have got the same issues with Red Hat content.

I’ve got no issues with an export of format syncable, but that’s not an option for us and for deb repos.

Is there anything I can do?

We have got the same issues with Red Hat content.

Can you specify which content exactly (and what was the storage needed)? I would try to reproduce it if it’s under 500GB storage.