Bug 789018 - Error Retrieving and Updating Backing Content for Webapp with Multiple Installed Packages
Summary: Error Retrieving and Updating Backing Content for Webapp with Multiple Instal...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 4.3
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: JON 3.0.1
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 771777
Blocks: 788629
TreeView+ depends on / blocked
 
Reported: 2012-02-09 15:51 UTC by Stefan Negrea
Modified: 2013-09-03 15:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 771777
Environment:
Last Closed: 2013-09-03 15:15:29 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Negrea 2012-02-09 15:51:44 UTC
+++ This bug was initially created as a clone of Bug #771777 +++

Description of problem:
CLI methods retrieveBackingContent and updateBackingContent error if the webapp has multiple installed packages attached. A webapp should have only one installed package at any time, so under normal operation circumstances this scenario should not happen. However a database update error could result in having multiple installed packages attached to a webapp. If this happens, the uses will not be able to operate on the webapp from the CLI until the database is manually corrected.

How reproducible:
Every time.

Steps to Reproduce:
1. Have a JBoss AS5, JBoss AS4, or Tomcat server inventoried
2. Manually update the database to have two installed packages attached to a webapp.
3. Use the CLI to find the webapp resource.
4. Call updateBackingContent on the webapp resource.
  
Actual results:
NPE error

Expected results:
The deployment process succeeds and the database is corrected during discovery.

Additional info:
The scenario described has a high occurrence chance with the old version scheme (eg. version=1.0). The scenario is very unlikely to happen with the new version scheme (eg. version=[sha256=abcd123]) however the risk is still present.

Comment 1 Stefan Negrea 2012-02-09 15:53:47 UTC
release/jon3.0.x branch commit:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=f23bb069591eef82c0344efa5e2b0e0ee3bb4e8d

Comment 2 Simeon Pinder 2012-02-10 22:44:54 UTC
Moving to ON_QA as new RC 4 available to test in:
https://brewweb.devel.redhat.com//buildinfo?buildID=198384

Comment 3 Libor Zoubek 2012-02-27 12:05:22 UTC
According to Stefan's advice on IRC I've Performed these steps:
1.have deploymnet hello.war( id=1000 ) on EAP4
 - select * from rhq_installed_package where resource_id=1000 returns 1 row
2. created another row in rhq_installed_package having same resource id, but different package_version_id
 - UI then shows 2 different installed packages for hello.war resource
3. deployed hello.war using content subsytem
 - UI do longer displays 2 installed packages
 - select * from rhq_installed_package where resource_id=1000 returns 1 row and refers to new package_version_id, the old rows in rhq_package_version still exist

Comment 4 Heiko W. Rupp 2013-09-03 15:15:29 UTC
Bulk closing of old issues in VERIFIED state.


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