Bug 461295 - ISE when saving kickstarts with custom commands in advanced options for Satellites upgraded to 5.1.x
Summary: ISE when saving kickstarts with custom commands in advanced options for Satel...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades
Version: 510
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Steve Salevan
URL:
Whiteboard:
Depends On:
Blocks: 446861
TreeView+ depends on / blocked
 
Reported: 2008-09-05 17:28 UTC by Xixi
Modified: 2008-11-05 18:42 UTC (History)
3 users (show)

Fixed In Version: sat520
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-05 18:42:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xixi 2008-09-05 17:28:08 UTC
Description of problem:
While looking into bug 459635, it's found that the 5.0->5.1 upgrade script is missing an insert - namely, a rhnKickstartCommand for command type "custom". This results in an internal server error when you attempt to use custom commands in advanced options section of Kickstart profiles.

satellite-5.0-to-5.1.sql should contain this line -
insert into rhnKickstartCommandName (id, name, uses_arguments, sort_order, required)
values (rhn_kscommandname_id_seq.nextval, 'custom', 'Y', 52, 'N');

Snippets of the ISE stacktrace from catalina.out -
...
2008-09-04 17:38:00,320 [TP-Processor2] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
com.redhat.rhn.common.hibernate.HibernateRuntimeException: HibernateException executing CachedStatement
...
Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [com.redhat.rhn.domain.kickstart.KickstartCommand]
...
Caused by: java.sql.SQLException: ORA-01400: cannot insert NULL into ("RHNSAT"."RHNKICKSTARTCOMMAND"."KS_COMMAND_NAME_ID")

Version-Release number of selected component (if applicable):


How reproducible:
Always, on a satellite upgraded to 5.1.x.

Steps to Reproduce:
1. Open and edit any kickstart profile, go to Kickstart Details -> Advanced options. 
2. Type anything in the Custom options text box.
3. Click on Update kickstart.
  
Actual results:
Internal Server Error with stacktrace above.

Expected results:
Succeeds with no ISE.

Additional info:

Comment 1 Xixi 2008-09-05 18:12:41 UTC
In the meantime, the following should fix it...

Run via sqlplus -
insert into rhnKickstartCommandName (id, name, uses_arguments, sort_order,
required)
values (rhn_kscommandname_id_seq.nextval, 'custom', 'Y', 52, 'N');
commit;

Then service tomcat5 restart.

Xixi

Comment 2 Clifford Perry 2008-09-08 08:11:04 UTC
Morning Michael, 

Could we look to fix this within the 5.0 -> 5.1 schema upgrade script, if indeed it is (as it seems to be from comment #1's fix) so that anyone upgrading from 5.0 -> 5.2 with the rhn-upgrade package will not have ISE as reported for replication. 

Once fixed, rebuild rhn-upgrade package to be ready for next Goldmember QA push. 

Cliff

Comment 3 Michael Mráka 2008-09-08 10:18:16 UTC
Fixed and built
Sending        satellite-upgrade/satellite-5.0-to-5.1.sql
Transmitting file data .
Committed revision 176698.

rhn-upgrade-5.2.0-13.el4
rhn-upgrade-5.2.0-13.el5

Comment 4 Steve Salevan 2008-09-17 21:40:59 UTC
Verified on 520, no ISE produced and kickstart options shown in generated KS file.

Comment 5 Jeff Browning 2008-10-27 21:12:33 UTC
verified

Comment 6 Brandon Perkins 2008-11-05 18:42:20 UTC
5.2.0 Satellite is now GA, bugs Closed for Current Release.


Note You need to log in before you can comment on or make changes to this bug.