This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 466035 - can't delete an org if it has created errata associated with package
can't delete an org if it has created errata associated with package
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
530
All Linux
medium Severity medium
: ---
: ---
Assigned To: Shannon Hughes
Preethi Thomas
:
Depends On: 480671
Blocks: 456998 486216
  Show dependency treegraph
 
Reported: 2008-10-07 16:07 EDT by Justin Sherrill
Modified: 2009-09-10 14:13 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 14:13:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2008-10-07 16:07:42 EDT
Steps to recreate:

1.  create an org
2.  create a custom errata
3.  associate packages to that errata (may need to clone a channel first, to be able to associate packages).
4.  publish errata
5.  try to delete org.

You cant, and you get this nice tracebacK:

Caused by: com.redhat.rhn.common.db.WrappedSQLException: ORA-04091: table RHNSAT.RHNERRATA is mutating, 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 Shannon Hughes 2009-01-23 14:38:49 EST
changes for #480671 should fix this
Comment 2 Preethi Thomas 2009-02-10 11:15:02 EST
fails_qa

followe the above test plan. ISE

The following exception occurred while executing this request:
POST /rhn/admin/multiorg/DeleteOrg.do

Date:2/10/09 11:12:30 AM EST
Headers:
  host: fjs-0-20.rhndev.redhat.com
  user-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008091816 Red Hat/3.0.2-3.el5 Firefox/3.0.2
  accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  accept-language: en-us,ar;q=0.8,ja;q=0.5,ml;q=0.3
  accept-encoding: gzip,deflate
  accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  connection: keep-alive
  referer: https://fjs-0-20.rhndev.redhat.com/rhn/admin/multiorg/DeleteOrg.do?oid=2
  cookie: JSESSIONID=18C4B2A06A6018C74E88ECEAA29F8682; rh_omni_tc=70160000000H4AjAAK; s_vi=[CS]v1|48EE249D00003447-A3A085D0000017A[CE]; s_cc=true; s_sq=%5B%5BB%5D%5D; rh_sso=0|otvkM6V0KY1bhcGzV66doUTeGBbBvLn102J; rh_user=preethit|Preethi|member; rh_shared_auth=f6b2b98de81805650fc51fbb5c2779b96dc3bdd2a4fafe73794bd21c364d85e7ed207c9c60ecf65bbce3d5300bcf2e4157afa45797f3d6430539117d62875df9; pxt-session-cookie=25x759a4587aa4c0e88f010540f33b575bc
  content-type: application/x-www-form-urlencoded
  content-length: 14

Request:
Local Name = fjs-0-20.rhndev.redhat.com
Server Name = fjs-0-20.rhndev.redhat.com
Requested Session Id came from Cookie
Requested Session Valid = true
Session = org.apache.catalina.session.StandardSessionFacade@6f826f82[session=StandardSession[18C4B2A06A6018C74E88ECEAA29F8682]]
Protocol = https
Request Locale = en_US
Request Character Encoding = UTF-8
Attribute Names = rhnActiveLang, javax.servlet.jsp.jstl.fmt.timeZone.request, javax.servlet.error.message, javax.servlet.request.key_size, javax.servlet.request.ssl_session, __sitemesh__page, javax.servlet.request.cipher_suite, org.apache.struts.action.MESSAGE, javax.servlet.error.exception, javax.servlet.error.servlet_name, org.apache.struts.action.MODULE, __sitemesh__filterapplied, orgDeleteForm, javax.servlet.error.status_code, javax.servlet.error.request_uri, session, org.apache.struts.action.mapping.instance, requestedUri,

Form Variables:
  submitted: true
  oid: 2


User Information:
User admin (id 1, org_id 1)

Exception:
javax.servlet.ServletException: ORA-04091: table RHNSAT.RHNERRATA is mutating, 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 69
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:237)
        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.java: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.java: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.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.LocalizedEnvironmentFilter.doFilter(LocalizedEnvironmentFilter.java:67)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: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.java: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.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at com.redhat.rhn.frontend.servlets.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:97)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: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:172)
        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:735)
Caused by: com.redhat.rhn.common.db.WrappedSQLException: ORA-04091: table RHNSAT.RHNERRATA is mutating, 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 69
ORA-06512: at line 1

        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
        at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
        at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:218)
        at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:969)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
        at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3476)
        at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4400)
        at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.execute(NewProxyCallableStatement.java:2706)
        at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:115)
        at com.redhat.rhn.common.db.datasource.CachedStatement.executeCallable(CachedStatement.java:507)
        at com.redhat.rhn.common.db.datasource.CallableMode.execute(CallableMode.java:34)
        at com.redhat.rhn.domain.org.OrgFactory.deleteOrg(OrgFactory.java:97)
        at com.redhat.rhn.frontend.action.multiorg.OrgDeleteAction.deleteOrg(OrgDeleteAction.java:113)
        at com.redhat.rhn.frontend.action.multiorg.OrgDeleteAction.execute(OrgDeleteAction.java:70)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        ... 40 more
Caused by: java.sql.SQLException: ORA-04091: table RHNSAT.RHNERRATA is mutating, 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 69
ORA-06512: at line 1

        ... 58 more
Comment 3 Shannon Hughes 2009-02-12 10:24:05 EST
modified rhn_org pl/sql to manually remove rhnErrataPackage records since rhnErrata needs the trigger to remain for proper cache functionality.
Comment 4 Preethi Thomas 2009-02-24 08:51:28 EST
verified

ISO: Satellite-5.3.0-RHEL5-re20090220.1-i386-embedded-oracle.iso

1.  create an org
2.  create a custom errata
3.  associate packages to that errata (may need to clone a channel first, to be
able to associate packages).
4.  publish errata
5.  try to delete org.
Comment 5 Tomas Lestach 2009-09-07 05:24:33 EDT
Followed test plan from #Description.
Organization was successfully deleted.

Stage validated -> RELEASE_PENDING
Comment 6 Brandon Perkins 2009-09-10 14:13:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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