Bug 466037 - Can't delete an org if it has a custom package
Can't delete an org if it has a custom package
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
530
All Linux
high Severity high
: ---
: ---
Assigned To: Shannon Hughes
Preethi Thomas
:
Depends On: 480671
Blocks: 456998 486216
  Show dependency treegraph
 
Reported: 2008-10-07 16:25 EDT by Justin Sherrill
Modified: 2009-09-10 14:14 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 14:14:02 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:25:38 EDT
1 Create a new org
2. push a custom package to it
3.  Try to delete it.

You can't, as you'll get integrity constraint violations:


xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: ORA-02292: integrity constraint (RHNSAT.RHN_PKG_CHANGELOG_PID_FK) violated - child record found\nORA-06512: at "RHNSAT.RHN_ORG", line 58\nORA-06512: at line 1\n'>
Comment 1 Shannon Hughes 2009-01-23 14:39:07 EST
changes to 480671 should fix this
Comment 2 Preethi Thomas 2009-02-11 09:23:37 EST
fails_qa
Satellite-5.3.0-RHEL5-re20090206.1-i386-embedded-oracle.iso

1 Create a new org
2.push a custom package to the org
3. Try to delete the org.

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

Date:2/11/09 9:21:43 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=22
  cookie: JSESSIONID=4EEA56FBCE7E1F110B64C3517D510FA3; rh_auth_token=1:1234360793xc29fc9316cb0c45a89aa1ce7ad24d75d; pxt-session-cookie=66x35139442e026439a4ea8e0dc8e1acefb
  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@67b567b5[session=StandardSession[4EEA56FBCE7E1F110B64C3517D510FA3]]
Protocol = https
Request Locale = en_US
Request Character Encoding = UTF-8
Attribute Names = rhnActiveLang, javax.servlet.jsp.jstl.fmt.timeZone.request, javax.servlet.request.key_size, __sitemesh__filterapplied, javax.servlet.request.ssl_session, orgDeleteForm, javax.servlet.request.cipher_suite, org.apache.struts.action.MESSAGE, session, org.apache.struts.action.mapping.instance, requestedUri, org.apache.struts.action.MODULE,

Form Variables:
  submitted: true
  oid: 22


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

Exception:
javax.servlet.ServletException: ORA-02292: integrity constraint (RHNSAT.RHN_PKG_CONFLICTS_PACKAGE_FK) violated - child record found
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-02292: integrity constraint (RHNSAT.RHN_PKG_CONFLICTS_PACKAGE_FK) violated - child record found
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-02292: integrity constraint (RHNSAT.RHN_PKG_CONFLICTS_PACKAGE_FK) violated - child record found
ORA-06512: at "RHNSAT.RHN_ORG", line 69
ORA-06512: at line 1

        ... 58 more
Comment 3 Shannon Hughes 2009-02-11 16:14:57 EST
missing a cascade delete on rhnpackageconflicts. fixed.
Comment 4 Preethi Thomas 2009-02-24 08:43:38 EST
verified

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

1 Create a new org
2.push a custom package to the org
3. Try to delete the org.
Comment 5 Tomas Lestach 2009-08-19 10:54:47 EDT
Following test plan from Comment#4, organisation successfully deleted.

Stage validated -> RELEASE_PENDING
Comment 6 Brandon Perkins 2009-09-10 14:14:02 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.