Bug 484988 - ISE when attempting to delete a package in a custom channel
ISE when attempting to delete a package in a custom channel
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
530
All Linux
low Severity medium
: ---
: ---
Assigned To: Jay Dobies
John Matthews
: Regression
Depends On:
Blocks: 456985 486216
  Show dependency treegraph
 
Reported: 2009-02-10 18:46 EST by John Matthews
Modified: 2009-09-10 14:14 EDT (History)
3 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:46 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)
stacktrace showing 2 runs (23.12 KB, application/octet-stream)
2009-02-24 19:45 EST, John Matthews
no flags Details

  None (edit)
Description John Matthews 2009-02-10 18:46:44 EST
Description of problem:

When I try to delete a package from a custom channel I get an ISE.

This may be related to putting the Satellite into an odd state. I originally tried to push 2 packages with same nvrea into Satellite, yet I forgot to enable nvrea in rhn.conf.  After attempting to push the 2nd package and seeing a failure.  I tried to delete the channels and the 1 package which got pushed.

Now I see an ISE when trying to remove the package, or any new packages I add.


Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090206.1-i386-embedded-oracle.iso

How reproducible:
always 


Steps to Reproduce:
1. #Start with Satellite having nvrea disabled
/etc/rhn/rhn.conf enable_nvrea=0
2. Create 2 custom channels: centos & rhel
3. Choose a package which is in CentOS and RHEL and has same nvrea
I'm using "hesinfo" it's in SVN at:
rhn-svn /qa/automation/gold/src/main/resources/rhelPkgs/hesinfo-3.1.0-1.1.i386.rpm
rhn-svn /qa/automation/gold/src/main/resources/centosPkgs/hesinfo-3.1.0-1.1.i386.rpm
4. Push centos first
5. Push rhel package and notice failure 
6. Delete the centos channel
7. Now go to Manage Software Packages, try to delete hesinfo (centos) version


  
Actual results:
ISE

Expected results:
Package is deleted

Additional info:

The following exception occurred while executing this request:
POST /rhn/software/manage/packages/ConfirmPackageRemove.do

Date:2/10/09 5:24:28 PM EST
Headers:
  host: rlx-3-22.rhndev.redhat.com
  user-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2) Gecko/2008092318 Fedora/3.0.2-1.fc9 Firefox/3.0.2
  accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  accept-language: en-us,en;q=0.5
  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://rlx-3-22.rhndev.redhat.com/rhn/software/manage/packages/ConfirmPackageRemove.do
  cookie: JSESSIONID=60F4D59D321EA962C5138A35C4021691; s_vi=[CS]v1|48DD445300003F79-A3A08150000412B[CE]; rh_omni_tc=70160000000H4AjAAK; __qca=1222439771-83242179-53717700; pxt-session-cookie=72x548e9c6cf42a445cc7f51fbb945b36e2
  content-type: application/x-www-form-urlencoded
  content-length: 271

Request:
Local Name = rlx-3-22.rhndev.redhat.com
Server Name = rlx-3-22.rhndev.redhat.com
Requested Session Id came from Cookie
Requested Session Valid = true
Session = org.apache.catalina.session.StandardSessionFacade@485f485f[session=StandardSession[60F4D59D321EA962C5138A35C4021691]]
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, javax.servlet.request.cipher_suite, org.apache.struts.action.MESSAGE, parentUrl, session, org.apache.struts.action.mapping.instance, pageList, requestedUri, org.apache.struts.action.MODULE, 

Form Variables:
  confirm: Delete Package(s)
  list_4021519721_filterby: Package Name
  list_4021519721_oldfilterval: 
  list_4021519721_filterval: 
  4021519721_PAGE_SIZE_LABEL_SELECTED: null
  list_4021519721_sortby: nvrea
  4021519721_PAGE_SIZE_LABEL: 5
  cid: 
  list_4021519721_sortdir: asc
  submitted: true


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

Exception:
javax.servlet.ServletException: ORA-01732: data manipulation operation not legal on this view

	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-01732: data manipulation operation not legal on this view

	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.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
	at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
	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 com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
	at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:137)
	at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:454)
	at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:431)
	at com.redhat.rhn.common.db.datasource.CachedStatement.executeUpdate(CachedStatement.java:269)
	at com.redhat.rhn.common.db.datasource.WriteMode.executeUpdate(WriteMode.java:33)
	at com.redhat.rhn.manager.rhnpackage.PackageManager.clearNeededPackageCache(PackageManager.java:1004)
	at com.redhat.rhn.manager.rhnpackage.PackageManager.deletePackages(PackageManager.java:1020)
	at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.deletePackages(CustomPackagesDeleteConfirmAction.java:103)
	at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.execute(CustomPackagesDeleteConfirmAction.java:80)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	... 40 more
Caused by: java.sql.SQLException: ORA-01732: data manipulation operation not legal on this view

	... 60 more
Comment 1 John Matthews 2009-02-10 20:02:32 EST
I think this might be happening because the Satellite ran out of room on the filesystem. 

Will re-try on a fresh install and update BZ tomorrow.
Comment 2 John Matthews 2009-02-10 20:26:45 EST
I free'd up some room on the Sat and tried to delete the package, still failing with the ISE.  

Will try a fresh install and update BZ later.
Comment 3 Jay Dobies 2009-02-11 15:44:38 EST
Commit: f3002fc42752a1456b7e7e4bb21f746fb9067595

Package_queries.cleanup_needed_package_cache
-------------------
Query was missed in the conversion of rhnServerNeededPackageCache from table to view
Comment 4 John Matthews 2009-02-24 19:44:16 EST
It looks like more problems still exist.

I saw package deletion of a custom package work for me, it looks like the first problem was addressed and fixed, yet something is still not right.

I enabled nvrea, ran sat-sync to import 2 custom channels each with a package with same nvrea.  I saw the packages were not imported successfully, i.e. only 1 package was imported, yet it was linked to both channels.  i.e. instead of having one customrhel channel with a rhel package and a customcentos channel with a centos package, I had 2 channels both displaying the centos package.  


I attempted to clean up this setup and I got an ISE.

2009-02-24 19:30:18,661 [TP-Processor7] WARN  org.apache.struts.action.RequestProcessor - Unhandled Exception thrown: class com.redhat.rhn.common.db.ConstraintViolationException
2009-02-24 19:30:18,662 [TP-Processor7] ERROR com.redhat.rhn.frontend.servlets.SessionFilter - Error during transaction. Rolling back
javax.servlet.ServletException: ORA-00001: unique constraint (RHNSAT.RHN_PFDQUEUE_PATH_UQ) violated


 at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
        at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:137)
        at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:454)
        at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:431)
        at com.redhat.rhn.common.db.datasource.CachedStatement.executeUpdate(CachedStatement.java:269)
        at com.redhat.rhn.common.db.datasource.WriteMode.executeUpdate(WriteMode.java:33)
        at com.redhat.rhn.manager.rhnpackage.PackageManager.schedulePackageFileForDeletion(PackageManager.java:735)
        at com.redhat.rhn.manager.rhnpackage.PackageManager.deletePackages(PackageManager.java:1036)
        at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.deletePackages(CustomPackagesDeleteConfirmAction.java:103)
        at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.execute(CustomPackagesDeleteConfirmAction.java:80)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        ... 40 more
Caused by: 
java.sql.SQLException: ORA-00001: unique constraint (RHNSAT.RHN_PFDQUEUE_PATH_UQ) violated

        ... 60 more
2009-02-24 19:30:18,769 [TP-Processor7] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rhn].[action] - Servlet.service() for servlet action threw exception
java.sql.SQLException: ORA-00001: unique constraint (RHNSAT.RHN_PFDQUEUE_PATH_UQ) violated

        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.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
        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 com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:651)
        at com.redhat.rhn.common.db.NamedPreparedStatement.execute(NamedPreparedStatement.java:137)
        at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:454)
        at com.redhat.rhn.common.db.datasource.CachedStatement.execute(CachedStatement.java:431)
        at com.redhat.rhn.common.db.datasource.CachedStatement.executeUpdate(CachedStatement.java:269)
        at com.redhat.rhn.common.db.datasource.WriteMode.executeUpdate(WriteMode.java:33)
        at com.redhat.rhn.manager.rhnpackage.PackageManager.schedulePackageFileForDeletion(PackageManager.java:735)
        at com.redhat.rhn.manager.rhnpackage.PackageManager.deletePackages(PackageManager.java:1036)
        at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.deletePackages(CustomPackagesDeleteConfirmAction.java:103)
        at com.redhat.rhn.frontend.action.rhnpackage.CustomPackagesDeleteConfirmAction.execute(CustomPackagesDeleteConfirmAction.java:80)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
Comment 5 John Matthews 2009-02-24 19:45:54 EST
Created attachment 333110 [details]
stacktrace showing 2 runs
Comment 8 John Matthews 2009-02-25 16:05:57 EST
bug 487412 was opened up to address comment #4
Comment 10 Brandon Perkins 2009-09-10 14:14:46 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.