Bug 571608
| Summary: | ISE (Internal Server Error) and traceback email when trying to update packages in Kickstart -> Profile -> Software -> Package Groups for profiles created before RHBA-2009-1566 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Xixi <xdmoon> | ||||||
| Component: | Server | Assignee: | Justin Sherrill <jsherril> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Dimitar Yordanov <dyordano> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | high | ||||||||
| Version: | 530 | CC: | cperry, dyordano, jhutar, jkastner, mmraka, tao, xdmoon | ||||||
| Target Milestone: | --- | Keywords: | Patch | ||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | spacewalk-schema-1.2.21-5 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2010-10-28 15:04:12 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 487678 | ||||||||
| Attachments: |
|
||||||||
|
Description
Xixi
2010-03-09 00:24:36 UTC
Created attachment 398649 [details]
bug-571608-kickstart-workaround.TEST.571608.sql
Created attachment 398650 [details]
rhnKickstartPackage.TEST.571608.1.patch
Proposed workaround: 1) download SQL script bug-571608-kickstart-workaround.TEST.571608.sql attached to this BZ 2) get your satellite database connection string 3) sqlplus dbuser/dbpassword@dbsid @bug-571608-kickstart-workaround.TEST.571608.sql 4) move /var/lib/rhn/kickstarts/wizard/* to some place else 5) wait 10 minutes for the correct/new kickstart files to be regenerated Proposed fix attached: rhnKickstartPackage.TEST.571608.1.patch This adds a uniqueness constraint on (kickstart_id, package_name_id) for rhnKickstartPackage table to be consistent with the hibernate definition. Of course, prior to adding the constraint probably will need to fix any existing bad data with something like bug-571608-kickstart-workaround.TEST.571608.sql in workaround above. Since the fix requires a schema change, aligning/proposing for sat-600 instead of sat-530. (In reply to comment #3) Needless to say, make sure there's a working copy of the Satellite database before attempting the workaround in Comment #3. fixed schema and added upgrade script. Thanks for that xixi! 17ddce1bf66fe747366abbf7ee4aee0fec728f67 We still need to remove the duplicate kickstart_id, package_name_id values from the table before we can apply the "unique (kickstart_id, package_name_id)" constraint otherwise the schema upgrade would fail. duplicate kickstart_id, package_name_id pairs removed during schema upgrade: spacewalk.git master: e81db82da535a81c7ff65c925bbeb436bf368824 satellite.git master: 6861e0f64e2296239ba682c0cb75ed417cca428f I'm giving up the qa ownership of the bug, since I was doing modification to it. VERIFIED. I tested the issue on Satellite-5.4.0-RHEL5-re20101013.0, spacewalk-schema-1.2.21-7.el5sat and I was not able to add package from the list in a different position. SQL> select * from rhnKickstartPackage; KICKSTART_ID PACKAGE_NAME_ID POSITION CREATED MODIFIED ------------ --------------- ---------- --------- --------- 1 2681 0 16-OCT-10 16-OCT-10 1 2682 1 16-OCT-10 16-OCT-10 1 1590 2 16-OCT-10 16-OCT-10 1 1072 3 16-OCT-10 16-OCT-10 1 720 4 16-OCT-10 16-OCT-10 SQL> insert into rhnKickstartPackage values (1, 720, 5,'08-MAR-10', '08-MAR-10'); insert into rhnKickstartPackage values (1, 720, 5,'08-MAR-10', '08-MAR-10') * ERROR at line 1: ORA-00001: unique constraint (RHNSAT.RHN_KSPACKAGE_NAME_UQ) violated Dimi Verified in stage.
Package can be only once in kickstart (there is unique constraint).
SQL> select * from rhnKickstartPackage where KICKSTART_ID = 163;
KICKSTART_ID PACKAGE_NAME_ID POSITION CREATED MODIFIED
------------ --------------- ---------- --------- ---------
163 1052 1 22-OCT-10 22-OCT-10
163 1512 2 22-OCT-10 22-OCT-10
163 4212 0 22-OCT-10 22-OCT-10
SQL> insert into rhnKickstartPackage values (163, 1052, 3, sysdate, sysdate);
insert into rhnKickstartPackage values (163, 1052, 3, sysdate, sysdate)
*
ERROR at line 1:
ORA-00001: unique constraint (RHNSAT.RHN_KSPACKAGE_NAME_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 |