Debian 10 Uyuni Client reposync error
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: <class 'TypeError'> 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
Hi Markus, I have an answer for your repository issue. This is a known bug from the last version of Uyuni impacting at least Ubuntu 18.04/20.04 and Debian 10 repos. https://github.com/uyuni-project/uyuni/issues/3023 Issue is already closed and fix should be present in the next Uyuni release. Philippe. Philippe Bidault | Unix Engineer | Getronics M. 34617301667 | E. Philippe.Bidault@Getronics.com | W. www.getronics.com Getronics CMC Service Desk Iberia S.L - VAT No:S.L.: B66686262. Registered Office - Getronics CMC Service Desk Iberia S.L, C/Rosselloi, Porcel, 21 planta 11, 08016 Barcelona, Spain. The information transmitted is intended only for use by the addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material. Thank you. Legal disclaimer: http://www.getronics.com/legal/ -----Original Message----- From: Markus.Thum@iese.fraunhofer.de <Markus.Thum@iese.fraunhofer.de> Sent: viernes, 15 de enero de 2021 9:19 To: users@lists.uyuni-project.org Subject: Debian 10 Uyuni Client reposync error CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. 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: <class 'TypeError'> 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
https://github.com/uyuni-project/uyuni/issues/3023 sent from my mobile device -------- Originale Nachricht -------- Von: markus.thum@iese.fraunhofer.de Gesendet: Fri Jan 15 09:19:26 GMT+01:00 2021 An: users@lists.uyuni-project.org Betreff: Debian 10 Uyuni Client reposync error 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: <class 'TypeError'> 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
participants (3)
-
Bidault, Philippe
-
Markus.Thum@iese.fraunhofer.de
-
Robert Paschedag