Bug 461295 - ISE when saving kickstarts with custom commands in advanced options for Satellites upgraded to 5.1.x
ISE when saving kickstarts with custom commands in advanced options for Satel...
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Steve Salevan
Depends On:
Blocks: 446861
  Show dependency treegraph
Reported: 2008-09-05 13:28 EDT by Xixi
Modified: 2008-11-05 13:42 EST (History)
3 users (show)

See Also:
Fixed In Version: sat520
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-05 13:42:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Xixi 2008-09-05 13:28:08 EDT
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 14:12:41 EDT
In the meantime, the following should fix it...

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

Then service tomcat5 restart.

Comment 2 Clifford Perry 2008-09-08 04:11:04 EDT
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. 

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

Comment 4 Steve Salevan 2008-09-17 17:40:59 EDT
Verified on 520, no ISE produced and kickstart options shown in generated KS file.
Comment 5 Jeff Browning 2008-10-27 17:12:33 EDT
Comment 6 Brandon Perkins 2008-11-05 13:42:20 EST
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.