Description of problem: After 0.7 -> 0.8 upgrade spacewalk-repo-sync ends up with ORA-01422: exact fetch returns more than requested number of rows. Actually it's a bug in schema upgrade script which created duplicated entries in rhnChecksum table. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. install spacewalk 0.7 + create a channel 2. push spacewalk-pxt-0.7.8-1.el5.noarch.rpm and spacewalk-base-minimal-0.7.8-1.el5.noarch.rpm to the channel 3. perform upgrade to 0.8 4. push spacewalk-pxt-0.8.17-1.el5.noarch to the channel Actual results: Traceback and ORA-01422: exact fetch returns more than requested number of rows Expected results: no error, package pushed Additional info:
The bug is not present in sql upgrade scripts but update-packages script and it applies to sha256 packages only. New steps to reproduce: 1. install spacewalk 0.7 + create a channel 2. push spacewalk-pxt-0.7.8-1.fc12.noarch.rpm and spacewalk-base-minimal-0.7.8-1.fc12.noarch.rpm to the channel 3. perform upgrade to 0.8 4. push spacewalk-pxt-0.8.17-1.fc12.noarch to the channel
Created attachment 397296 [details] bz568293-fix.sql This is an sql script to fix duplicates in database. As root run # sqlplus $(spacewalk-cfg-get default_db) @bz568293-fix.sql
Created attachment 397321 [details] bz568293-fix.sql New version which also creates unique constraint.
spacewalk-schema-0.8.15-1 contains fixed schema. Test plan: 1) see comment #1 for steps to reproduce make sure you have spacewalk-schema-0.8.12-1.el5.noarch installed to reproduce the error after applying bz568293-fix.sql rhnpush and/or spacewalk-repo-sync have to work again 2) when installed spacewalk-schema-0.8.15-1 error should be never raised while doing comment #1 for steps to reproduce
# REOPEN Hi Michael, Going through the second scenario (yum install spacewalk-oracle-0.8.1-1.el5; rpm -Uvh http://koji.rhndev.redhat.com/mnt/koji/packages/spacewalk-schema/0.8.15/1.el5/noarch/spacewalk-schema-0.8.15-1.el5.noarch.rpm; spacewalk-setup) there seems the issue not fixed still... I'll keep the current SW 0.8 installation for your reproducer/investigations. Contact me for details to get access to that server. Thanks.
This bug has been fixed in Spacewalk 1.0.