[Spacewalk-list] rhnpush errors with 'unique constraint (SPACEWALK.RHN_CNP_CID_NID_UQ) violated'

Mike Hanby mhanby at uab.edu
Fri Sep 4 14:17:57 UTC 2009


Ok, I worked my way around this by using spacewalk-repo-sync instead of rhnpush. Here's what I do in my nightly cron script (notice I create a local yum repo after rhnget and then use spacewalk-repo-sync to sync it to Spacewalk)

# RHEL 4 x86_64
reposync="/usr/bin/spacewalk-repo-sync"
arch=x86_64
echo "Rhnget: rhel4-updates-$arch"
$rhnget -s /var/www/html/pub/RHEL4-WS-$arch/systemid rhns:///rhel-x86_64-ws-4 /var/www/html/pub/RHEL4-WS-$arch/updates > /tmp/rhel4-updates-$arch
$createrepo /var/www/html/pub/RHEL4-WS-x86_64/updates/
$reposync -c rhel4-updates-$arch -t yum -l redhat -u file:///var/www/html/pub/RHEL4-WS-$arch/updates

-----Original Message-----
From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Mike Hanby
Sent: Tuesday, August 25, 2009 10:17 AM
To: 'spacewalk-list at redhat.com'
Subject: [Spacewalk-list] rhnpush errors with 'unique constraint (SPACEWALK.RHN_CNP_CID_NID_UQ) violated'

I upgraded from .5 to .6 and the only problem I've encountered is a unique constraint violation when attempting to rhnpush my RHEL4 rpms to the spacewalk channel.

I have moved all of my channels (except rhel4-updates-$arch rhel4-extras-$arch) to using the spacewalk-repo-sync command and they are all updating the channels properly.

========================= commands ========================

arch=x86_64

rhnget -s /var/www/html/pub/RHEL4-WS-$arch/systemid rhns:///rhel-x86_64-ws-4 /var/www/html/pub/RHEL4-WS-$arch/updates 

rhnpush --channel=rhel4-updates-$arch --server=http://localhost/APP --dir=/var/www/html/pub/RHEL4-WS-$arch/updates --username=xxxxxxxxxxx --password=xxxxxxxxxx

Error Message:
    ORA-00001: unique constraint (SPACEWALK.RHN_CNP_CID_NID_UQ) violated
ORA-06512: at "SPACEWALK.RHN_CHANNEL", line 1131
ORA-06512: at line 1
Error Class Code: 23
Error Class Info: Could not update database entry.

========================= commands ========================

This same script worked fine in 0.5, any suggestions on what could be wrong or how I might debug it further

Thanks,

Mike

_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list