Bug 467501

Summary: ISE while trying to delete an organization
Product: [Community] Spacewalk Reporter: wes hayutin <whayutin>
Component: ServerAssignee: Shannon Hughes <shughes>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: urgent    
Version: 0.3CC: cperry, jesusr, shughes
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://dhcp231-223.rdu.redhat.com/rhn/admin/multiorg/DeleteOrg.do?oid=3077
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-17 07:08:30 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: 480671    
Bug Blocks: 456553    

Description wes hayutin 2008-10-17 19:24:39 UTC
Description of problem:

In this case I was deleting an organization created by the api.
However, for lack of a better recreate..

1. create an organization
2. give entitlments, register systems
the above can be done by running the api automation against spacewalk
3. delete the organization




get java ise

2008-10-17 11:13:15,299 [TP-Processor5] WARN  org.apache.struts.action.RequestProcessor - Unhandled E
xception thrown: class com.redhat.rhn.common.db.WrappedSQLException
2008-10-17 11:13:15,300 [TP-Processor5] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error 
during transaction. Rolling back
javax.servlet.ServletException: ORA-04091: table RHNSAT.RHNERRATA is mutating, trigger/function may n
ot see it
ORA-06512: at "RHNSAT.RHN_ERRATA_PACKAGE_MOD_TRIG", line 6
ORA-04088: error during execution of trigger 'RHNSAT.RHN_ERRATA_PACKAGE_MOD_TRIG'
ORA-06512: at "RHNSAT.RHN_ORG", line 58
ORA-06512: at line 1

        at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at com.redhat.rhn.frontend.struts.RhnRequestProcessor.process(RhnRequestProcessor.java:82)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.AuthFilter.doFilter(AuthFilter.java:73)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
        at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentF
ilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.EnvironmentFilter.doFilter(EnvironmentFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SessionFilter.doFilter(SessionFilter.java:55)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF
ilter.java:97)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.ja
va:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:636)
Caused by: com.redhat.rhn.common.db.WrappedSQLException: ORA-04091: table RHNSAT.RHNERRATA is mutatin
g, trigger/function may not see it
ORA-06512: at "RHNSAT.RHN_ERRATA_PACKAGE_MOD_TRIG", line 6
ORA-04088: error during execution of trigger 'RHNSAT.RHN_ERRATA_PACKAGE_MOD_TRIG'
ORA-06512: at "RHNSAT.RHN_ORG", line 58
ORA-06512: at line 1

Comment 1 wes hayutin 2008-10-17 19:51:39 UTC
Justin just informed that the api automation is creating orgs in an invalid way that may be causing this bug.

Comment 2 wes hayutin 2008-10-17 19:53:06 UTC
suggested recreate.. push a custom package to a custom channel in an org

Comment 3 Jeff Ortel 2009-01-12 22:37:29 UTC
This is easily reproducible in spacewalk and satellite 5.2 by:
1) create an org.
2) create a custom channel
3) push a package into the channel.
4) try and remove the org.

The ISE(s) that I observed are foreign key constraint violations for all of the package detail tables that have foreign keys into rhnPackage.  Many (maybe all) of these table were created with FK constraints that do NOT have ON DELETE CASCADE.  Not sure why.

After looking at the history on the DDL files used to create these tables, I'm not sure this ever worked.

A work around for 0.4 is to delete packages owned by the org before deleting the org.

Comment 5 Shannon Hughes 2009-02-25 14:42:43 UTC
this was fixed in 5.3. please retest in spacewalk.

Comment 6 Jesus M. Rodriguez 2009-04-14 14:11:40 UTC
Spacewalk 0.5 released.

Comment 7 Miroslav Suchý 2009-09-17 07:08:30 UTC
Spacewalk 0.5 has been released for long time ago.