One slight modification, if you use this technique, you should use the -q switch on createrepo, otherwise your nightly cron email will have thousands of lines courtesy of createrepo. (fixed in the example below)
-----Original Message----- From: spacewalk-list-boun...@redhat.com [mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Mike Hanby Sent: Friday, September 04, 2009 9:18 AM To: 'spacewalk-list@redhat.com' Subject: RE: [Spacewalk-list] rhnpush errors with 'unique constraint (SPACEWALK.RHN_CNP_CID_NID_UQ) violated' 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 -q /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-boun...@redhat.com [mailto:spacewalk-list-boun...@redhat.com] On Behalf Of Mike Hanby Sent: Tuesday, August 25, 2009 10:17 AM To: 'spacewalk-list@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@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list _______________________________________________ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list _______________________________________________ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list