SUSE Support

Here When You Need Us

Spacewalk-repo-sync generates error: "duplicate key value violates unique constraint "rhn_pkg_clr_pid_cld_uq"

This document (7024054) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager 3.2
SUSE Manager 4

Situation

When syncing a SLES15SP1 channel the following error is seen:

2019/08/09 10:57:41 +02:00   Importing packages to DB:
2019/08/09 10:58:45 +02:00 duplicate key value violates unique constraint "rhn_pkg_clr_pid_cld_uq"
DETAIL:  Key (package_id, changelog_data_id)=(207646, 610721) already exists.

2019/08/09 10:59:00 +02:00 'int' object has no attribute 'decode'
2019/08/09 10:59:06 +02:00 Importing packages finished.
2019/08/09 10:59:06 +02:00
2019/08/09 10:59:06 +02:00   Linking packages to the channel.
2019/08/09 10:59:06 +02:00 Unexpected error: <class 'spacewalk.server.importlib.importLib.InvalidPackageError'>
2019/08/09 10:59:06 +02:00 Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py", line 544, in sync
    ret = self.import_packages(plugin, data['id'], url)
  File "/usr/lib/python2.7/site-packages/spacewalk/satellite_tools/reposync.py", line 1120, in import_packages
    importer.run()

Resolution

Problem has been fixed with a patch, which will be released soon in the updates channels. Should the problem still exist after applying latest patches and restarting services, a PTF (Program Temporary Fix) can be installed meanwhile.

It can be found in the following links:

SUSE Manager 3.2 x86_64:

SUSE Manager 3.2 ppc64le:

SUSE Manager 3.2 s390x


SUSE Manager 4.0 x86_64:

SUSE Manager 4.0 s390x:


Customers should refer to the best practices for installing PTFs:

After installing the PTF, services should be restarted:

spacewalk-service restart

Then the channels can be synced manually. For instance (to be adapted to the affected channel(s) ):

spacewalk-repo-sync -c sle-module-basesystem15-sp1-updates-x86_64-sap

Cause


Additional Information


Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7024054
  • Creation Date: 09-Aug-2019
  • Modified Date:03-Mar-2020
    • SUSE Manager

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.