Description of problem: In Satellite 5.3.0 development course, rhnKickstartPackage table received new column named POSITION, which determines order in which user entered package names into %packages section for a particular kickstart profile (this is also the order in which those entries will be presented in the webui & kickstart file). In 5.3.0 schema upgrade course, this POSITION column was mistakenyl filled with zero columns, which effectively caused problems described in bug #527724. To fix the problem, schema upgrade for next Satellite release needs to correctly assign position values to every package in every kickstart profile (for cases, where this wasn't solved yet). Version-Release number of selected component (if applicable): satellite-schema-5.3.0.23-1 spacewalk-schema-0.5.20-23 Satellite 5.3.0 How reproducible: Deterministic Steps to Reproduce: 1. Install 5.2.0 or older satellite 2. Create couple of kickstart profiles, several of them need to have multiple entries in %packages section 3. Upgrade to latest Satellite Actual results: Whole POSITION column of rhnKickstartPackage table is set to zero, which causes problems described in bug #527724 Expected results: POSITION values are numbered correctly. Additional info: Following PL/SQL code fixes the problem: declare i number; begin for rec in ( select kickstart_id kid from rhnKickstartPackage where position = 0 group by kickstart_id having count(*) > 1 ) loop i := 0; for erec in ( select rhnKickstartPackage.rowid rid from rhnKickstartPackage, rhnPackageName where rhnKickstartPackage.package_name_id = rhnPackageName.id and rhnKickstartPackage.kickstart_id = rec.kid order by rhnKickstartPackage.position, rhnPackageName.name ) loop update rhnKickstartPackage set position = i where rhnKickstartPackage.rowid = erec.rid; i := i + 1; end loop; end loop; end; / commit;
Problem fixed by Michael Mraka in spacewalk-schema, spacewalk.git: 35e5f0f431788d7617dec023aeb19069175e0cf5
Verified with Satellite-5.4.0-RHEL5-re20101001.1 / spacewalk-schema-1.2.21-3
Results you see and are describing are expected. The procedure you used was correct -- 5.2.0 -> 5.4.0 upgrade. The position column was added after 5.2.0 , the data in the column was not set correctly and this bug report was just about that -- fixing the data.
I have updated Satellite 5.2.0 -> 5.4.0 and KS profiles software section did not kept their ordering: == Kickstart: jhutar1-Base == %packages @ Base == Kickstart: jhutar2-Base-a2ps-zsh == %packages @ Base a2ps zsh == Kickstart: jhutar3-Base-zsh-a2ps == %packages @ Base a2ps zsh == Kickstart: jhutar4-Base-acl-aide-MINUSacpid-adaptx == (see comment #4 for original order) %packages -acpid @ Base acl adaptx aide And in DB there is: SQL> Name Null? Type ----------------------------------------- -------- ---------------------------- KICKSTART_ID NOT NULL NUMBER PACKAGE_NAME_ID NOT NULL NUMBER CREATED NOT NULL DATE MODIFIED NOT NULL DATE POSITION NOT NULL NUMBER # echo "SELECT * FROM rhnKickstartPackage WHERE KICKSTART_ID = 4 ORDER BY POSITION;" | sqlplus rhnsat/rhnsat@rhnsat KICKSTART_ID PACKAGE_NAME_ID CREATED MODIFIED POSITION ------------ --------------- --------- --------- ---------- 4 2695 21-OCT-10 22-OCT-10 0 4 2462 21-OCT-10 22-OCT-10 1 4 805 21-OCT-10 22-OCT-10 2 4 1477 21-OCT-10 22-OCT-10 3 4 263 21-OCT-10 22-OCT-10 4 # echo "SELECT * FROM rhnPackageName WHERE ID = 2695 OR ID = 2462 OR ID = 805 OR ID = 1477 OR ID = 263;" | sqlplus rhnsat/rhnsat@rhnsat ID NAME ---------- ---------------------------------------------------------------- 2695 -acpid 2462 @ Base 805 acl 1477 adaptx 263 aide Please is this PASS (POSITION column seems sane) or FAIL (sorting was not kept)?
Results in comment #6 mean PASS.
So according to comment #7 this was re-verified => RELEASE_PENDING
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