Bug 1098563

Summary: [RHQ] --delete-only option does not delete data from the metric tables when using rhq-data-migration.sh script
Product: [Other] RHQ Project Reporter: bkramer <bkramer>
Component: InstallerAssignee: Michael Burman <miburman>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.9CC: hrupp, miburman
Target Milestone: ---   
Target Release: RHQ 4.12   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-15 11:35:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1098561    
Bug Blocks:    

Description bkramer 2014-05-16 14:49:05 UTC
Description of problem:

Deleting data from the metric tables in the database (after migration) using rhq-data-migration.sh script with --delete-only option does not happen.

Tried the following:

*********************************************************************
$ ./rhq-data-migration.sh --sql-user=<my_username> --sql-password=<my_password> --sql-connection-url=<my_oracle_connection_url> --delete-only=true --sql-server-oracle

and

$ ./rhq-data-migration.sh --sql-user=<my_username> --sql-password=<my_password> --sql-connection-url=<my_oracle_connection_url> --estimate-only=false --delete-only=true --sql-server-oracle

**********************************************************************


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

How reproducible:
Always

Steps to Reproduce:
1. Install JBoss ON 3.1.2 using Oracle database (didn't check with Postgres - but I'm guessing that it would behave in the same way)
2. Migrate to JBoss ON 3.2
3. Confirm that metric tables below still contain data:

RHQ_MEASUREMENT_DATA_NUM_1H
RHQ_MEASUREMENT_DATA_NUM_6H
RHQ_MEASUREMENT_DATA_NUM_1D
RHQ_MEAS_DATA_NUM_R14
RHQ_MEAS_DATA_NUM_R11
RHQ_MEAS_DATA_NUM_R10
RHQ_MEAS_DATA_NUM_R09
RHQ_MEAS_DATA_NUM_R08
RHQ_MEAS_DATA_NUM_R07
RHQ_MEAS_DATA_NUM_R06
RHQ_MEAS_DATA_NUM_R05
RHQ_MEAS_DATA_NUM_R04
RHQ_MEAS_DATA_NUM_R03
RHQ_MEAS_DATA_NUM_R02
RHQ_MEAS_DATA_NUM_R01
RHQ_MEAS_DATA_NUM_R00

4. Execute the following script to delete the data:

$ ./rhq-data-migration.sh --sql-user=<my_username> --sql-password=<my_password> --sql-connection-url=<my_oracle_connection_url> --delete-only=true --sql-server-oracle


Actual results:
Nothing happens - the data is still in the metric tables.

Expected results:
Data from the metric tables is deleted.

Additional info:

Comment 1 Michael Burman 2014-07-04 08:14:39 UTC
Fixed in commit 56c6891 (master).

Comment 2 Heiko W. Rupp 2014-12-15 11:35:57 UTC
Bulk close of items fixed in RHQ 4.12

If you think this is not solved, then please open a *new* BZ and link to this one.