Hi,
I'm trying to import the repositories for Debian 10.
Importing the main repo, security and updates succeeds, but syncing the client tools generates the following error:
2021/01/15 09:09:11 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'debian-10-amd64-uyuni-client', '--type', 'deb', '--non-interactive']
2021/01/15 09:09:11 +02:00 Sync of channel started.
2021/01/15 09:09:12 +02:00 Repo URL: https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable:...
2021/01/15 09:09:12 +02:00 Packages in repo: 15
2021/01/15 09:09:12 +02:00 Packages already synced: 0
2021/01/15 09:09:12 +02:00 Packages to sync: 15
2021/01/15 09:09:12 +02:00 New packages to download: 0
2021/01/15 09:09:12 +02:00 Downloading packages:
2021/01/15 09:09:12 +02:00 Importing packages started.
2021/01/15 09:09:12 +02:00
2021/01/15 09:09:12 +02:00 Importing packages to DB:
2021/01/15 09:09:12 +02:00 Package batch #1 of 1 completed...
2021/01/15 09:09:12 +02:00 Importing packages finished.
2021/01/15 09:09:12 +02:00
2021/01/15 09:09:12 +02:00 Linking packages to the channel.
2021/01/15 09:09:12 +02:00 Unexpected error:
2021/01/15 09:09:12 +02:00 Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 85, in __call__
ret = self.cursor.execute(query, args)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "rhn_cnp_cid_nid_uq"
DETAIL: Key (channel_id, name_id, package_arch_id)=(154, 1349, 134) already exists.
CONTEXT: SQL statement "insert into rhnChannelNewestPackage
(channel_id, name_id, evr_id, package_id, package_arch_id)
(select channel_id,
name_id, evr_id,
package_id, package_arch_id
from rhnChannelNewestPackageView
where channel_id = channel_id_in
and (package_name_id_in is null
or name_id = package_name_id_in)
)"
PL/pgSQL function rhn_channel.refresh_newest_package(numeric,character varying,numeric) line 9 at SQL statement
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/spacewalk/server/importlib/backend.py", line 2072, in update_newest_package_cache
refresh_newest_package(channel_id, caller, None)
File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 116, in __call__
result = Function.__call__(self, *args)
File "/usr/lib/python3.6/site-packages/spacewalk/server/rhnSQL/driver_postgresql.py", line 92, in __call__
raise sql_base.SQLSchemaError(error_code, e.pgerror, e)
spacewalk.server.rhnSQL.sql_base.SQLSchemaError: (99999, 'ERROR: duplicate key value violates unique constraint "rhn_cnp_cid_nid_uq"', 'DETAIL: Key (channel_id, name_id, package_arch_id)=(154, 1349, 134) already exists.\nCONTEXT: SQL statement "insert into rhnChannelNewestPackage\n (channel_id, name_id, evr_id, package_id, package_arch_id)\n (select channel_id,\n name_id, evr_id,\n package_id, package_arch_id\n from rhnChannelNewestPackageView\n where channel_id = channel_id_in\n and (package_name_id_in is null\n or name_id = package_name_id_in)\n )"\nPL/pgSQL function rhn_channel.refresh_newest_package(numeric,character varying,numeric) line 9 at SQL statement\n', UniqueViolation('duplicate key value violates unique constraint "rhn_cnp_cid_nid_uq"\nDETAIL: Key (channel_id, name_id, package_arch_id)=(154, 1349, 134) already exists.\nCONTEXT: SQL statement "insert into rhnChannelNewestPackage\n (channel_id, name_id, evr_id, package_id, package_arch_id)\n (select channel_id,\n name_id, evr_id,\n package_id, package_arch_id\n from rhnChannelNewestPackageView\n where channel_id = channel_id_in\n and (package_name_id_in is null\n or name_id = package_name_id_in)\n )"\nPL/pgSQL function rhn_channel.refresh_newest_package(numeric,character varying,numeric) line 9 at SQL statement\n',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 592, in sync
ret = self.import_packages(plugin, data['id'], url, is_non_local_repo)
File "/usr/lib/python3.6/site-packages/spacewalk/satellite_tools/reposync.py", line 1107, in import_packages
importer.run()
File "/usr/lib/python3.6/site-packages/spacewalk/server/importlib/importLib.py", line 777, in run
self.submit()
File "/usr/lib/python3.6/site-packages/spacewalk/server/importlib/packageImport.py", line 142, in submit
affected_channels=self.affected_channel_packages, name_ids=name_ids)
File "/usr/lib/python3.6/site-packages/spacewalk/server/importlib/backend.py", line 2075, in update_newest_package_cache
raise_with_tb(rhnFault(23, str(e[1]), explain=0), sys.exc_info()[2])
TypeError: 'SQLSchemaError' object does not support indexing
My server is Uyuni 2020.11 with updates from today.
btw: why are there two parent channels for Debian 10?
- Debian 10 (buster) pool for amd64
- Debian 10 (buster) pool for amd64 for Uyuni (this is the one with the uyuni client tools)
Viele Grüße
Markus