Bug 1098561 - rhq-data-migration --delete-only option does not delete data from the legacy metric tables
Summary: rhq-data-migration --delete-only option does not delete data from the legacy ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Upgrade, Launch Scripts, Storage Node
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER01
: JON 3.2.3
Assignee: Michael Burman
QA Contact: Jan Bednarik
URL:
Whiteboard:
Depends On:
Blocks: 1098563
TreeView+ depends on / blocked
 
Reported: 2014-05-16 14:44 UTC by bkramer
Modified: 2018-12-05 18:36 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-09-05 15:40:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1098572 0 unspecified CLOSED Metric data is not deleted from the database during migration from JBoss ON 3.1.x to JBoss ON 3.2 2021-02-22 00:41:40 UTC
Red Hat Knowledge Base (Solution) 885423 0 None None None Never

Internal Links: 1098572

Description bkramer 2014-05-16 14:44:59 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):
JBoss ON 3.2.0

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-01 19:23:12 UTC
The --delete-only parameter was not parsed from the command line. Fixed in commit 56c6891 (tested with postgres)

Comment 3 Simeon Pinder 2014-08-15 03:19:01 UTC
Moving to ON_QA as this is available for test in JON 3.2.3 ER01 build:

http://jon01.mw.lab.eng.bos.redhat.com:8042/dist/release/jon/3.2.3.GA/8-14-14/

Comment 4 Jan Bednarik 2014-08-25 12:04:17 UTC
Moving to VERIFIED.

Tested both with Postgres and Oracle databases. In both cases only 4 of the tables contained data before running rhq-data-migration.sh script.

Postgres:
RHQ_MEASUREMENT_DATA_NUM_1H,
RHQ_MEASUREMENT_DATA_NUM_6H,
RHQ_MEASUREMENT_DATA_NUM_1D,
RHQ_MEAS_DATA_NUM_R10 

Oracle:
RHQ_MEASUREMENT_DATA_NUM_1H,
RHQ_MEASUREMENT_DATA_NUM_6H,
RHQ_MEASUREMENT_DATA_NUM_1D,
RHQ_MEAS_DATA_NUM_R04

After running rhq-data-migration.sh --delete-only --sql-server-postgres (or --sql-server-oracle) no data were present in the tables.


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