Bug 1306605 - Undeployment of the resource leaves orphaned content data in the RHQ database
Undeployment of the resource leaves orphaned content data in the RHQ database
Status: NEW
Product: RHQ Project
Classification: Other
Component: Content (Show other bugs)
4.12
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: RHQ Project Maintainer
Mike Foley
:
Depends On:
Blocks: 1306602
  Show dependency treegraph
 
Reported: 2016-02-11 07:20 EST by bkramer
Modified: 2016-02-11 07:20 EST (History)
1 user (show)

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


Attachments (Terms of Use)
Archive file that contains first_deployment.zip, second_deployment.zip, third_deployment.zip and undeployed_war.zip archives (1.11 MB, application/zip)
2016-02-11 07:20 EST, bkramer
no flags Details

  None (edit)
Description bkramer 2016-02-11 07:20:58 EST
Created attachment 1123139 [details]
Archive file that contains first_deployment.zip, second_deployment.zip, third_deployment.zip and undeployed_war.zip archives

Description of problem:
Undeployment of the resource leaves all previously deployed package versions in the database. In a long run, this will fill up the database.

We should remove all content data from the database once relevant resource is undeployed. 


Version-Release number of selected component (if applicable):
RHQ 4.12

How reproducible:
Always

Steps to Reproduce:

1. Deployed memoryleak.war file with package version 1.0 to the EAP server (RHQ UI -> Inventory -> Servers -> EAP -> Inventory -> Create Child -> Deployment) see attached screen shots - first_deployment.zip;
2. Deployed memoryleak.war file with package version 2.0 to the EAP server (RHQ UI -> Inventory -> Servers -> EAP -> Inventory -> Create Child -> Deployment) see attached screen shots - second_deployment.zip;
3. Deployed memoryleak.war file with package version 3.0 to the EAP server (RHQ UI -> Inventory -> Servers -> EAP -> Inventory -> Create Child -> Deployment) see attached screen shots - third_deployment.zip;

4. Undeployed memoryleak.war resource (RHQ UI -> Inventory -> Servers -> EAP -> Inventory -> select "memoryleak.war" resource -> press "Uninventory" button) - as a result rhq_resource table did not contain "memoryleak.war" but rhq_package_version and rhq_package_bits still contained previously deployed content - see undeployed_war.zip



Actual results:
Selected resource was properly deleted (rhq_resource does not contain deleted resource) but rhq_package_version and rhq_package_bits tables still contained all previously deployed content data (undeployed_war.zip)

Expected results:
When resource is undeployed - all its history should be deleted from the database including content data.


Additional info:

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