Bug 1306605 - Undeployment of the resource leaves orphaned content data in the RHQ database
Summary: Undeployment of the resource leaves orphaned content data in the RHQ database
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: 4.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1306602
TreeView+ depends on / blocked
 
Reported: 2016-02-11 12:20 UTC by bkramer
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


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 12:20 UTC, bkramer
no flags Details

Description bkramer 2016-02-11 12:20:58 UTC
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.