Description of problem: Experience from bug #527724 shows that it would be desirable to create unique constraint for rhnKickstartPackage table on (kickstart_id, position). This way, problem described in bug #527724 would be revealed much sooner: very likely during schema upgrade testing. Additionally, the application layer itself expects linear ordering of packages in every kickstart profile. Version-Release number of selected component (if applicable): spacewalk-schema-0.5.20-23 / Satellite 5.3.0 How reproducible: Always Steps to Reproduce: 1. Create a new kickstart profile, put several packages into %packages section 2. With sqlplus connect to your database 3. SQL> update rhnKickstartPackage set position = 0 where kickstart_id = :ksid; (replace :ksid with actual kickstart id you just created) 4. SQL> commit; Actual results: Update succeeds, every package in this kickstart profile has zero position, information about user ordering is lost. Expected results: Update fails with unique constraint violated oracle error. Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=462239 https://bugzilla.redhat.com/show_bug.cgi?id=527724
Unique constraint was added in spacewalk.git/SPACEWALK-0.8: de3e61bd40178507c2884069e6f6e626371fd6a0 a2c33bd4064655a4a77a1a929b866488b51ebfad Upgrade fix that prevents having multiple non-unique entries before creating the constraint: spacewalk.git/SPACEWALK-0.8: bfbacb945ac058b9544576a6acaf1094d7785e87
SQL> update rhnKickstartPackage set position = 0 where kickstart_id = 1; update rhnKickstartPackage set position = 0 where kickstart_id = 1 * ERROR at line 1: ORA-00001: unique constraint (RHNSAT.RHN_KSPACKAGE_POS_UQ) violated
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332 RHEA-2010:0803 - RHN Tools enhancement update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333 RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334 RHEA-2010:0800 - RHN Satellite Server 5.4.0 https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335 Docs are available: http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html Regards, Clifford