Bug 1126410 - Upgrading from JON3.1.2 to JON3.3 Dr01 with run-data-migrator option displays InvalidQueryException
Summary: Upgrading from JON3.1.2 to JON3.3 Dr01 with run-data-migrator option displays...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Upgrade, Storage Node
Version: JON 3.3.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: ER04
: JON 3.3.0
Assignee: Stefan Negrea
QA Contact: Sunil Kondkar
URL:
Whiteboard:
Depends On: 1049054 1135604 1135630
Blocks: 1013508
TreeView+ depends on / blocked
 
Reported: 2014-08-04 11:44 UTC by Sunil Kondkar
Modified: 2014-12-11 14:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-11 14:01:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sunil Kondkar 2014-08-04 11:44:34 UTC
Description of problem:

While upgrading from JON3.1.2 to JON3.3, provided run-data-migrator option as below:

[root@dhcp201-130 bin]# ./rhqctl upgrade --from-server-dir /store/jonbuilds/JON3.1.2/jon-server-3.1.2.GA --from-agent-dir /store/jonbuilds/JON3.1.2/agent/rhq-agent --run-data-migrator do-it

It shows below stacktrace at the end:

10432 [main] DEBUG org.rhq.server.metrics.migrator.DataMigratorRunner  - Done creating Cassandra session
Estimation process - starting

com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily metrics_index
	at com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java:35)
	at com.datastax.driver.core.ResultSetFuture.extractCause(ResultSetFuture.java:277)
	at com.datastax.driver.core.Session.toPreparedStatement(Session.java:281)
	at com.datastax.driver.core.Session.prepare(Session.java:172)
	at org.rhq.server.metrics.migrator.workers.MetricsIndexUpdateAccumulator.<init>(MetricsIndexUpdateAccumulator.java:78)
	at org.rhq.server.metrics.migrator.workers.RawDataMigrator.<init>(RawDataMigrator.java:59)
	at org.rhq.server.metrics.migrator.DataMigrator.estimate(DataMigrator.java:114)
	at org.rhq.server.metrics.migrator.DataMigratorRunner.run(DataMigratorRunner.java:589)
	at org.rhq.server.metrics.migrator.DataMigratorRunner.main(DataMigratorRunner.java:171)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.jboss.modules.Module.run(Module.java:312)
	at org.jboss.modules.Main.main(Main.java:460)
Caused by: com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily metrics_index
	at com.datastax.driver.core.ResultSetFuture.convertException(ResultSetFuture.java:307)
	... 13 more
15:36:21,622 INFO  [org.rhq.server.control.command.Upgrade] The data migrator finished with exit value 1

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

Jboss ON version: JON 3.3 DR1 
Database version: Oracle 11g

How reproducible:

Always

Steps to Reproduce:

-Install JBoss ON 3.1.2
-Stop sever and agent
-Upgrade to JBoss ON 3.3 DR01 with run-data-migrator option.
(Ex: ./rhqctl upgrade --from-server-dir /store/jonbuilds/JON3.1.2/jon-server-3.1.2.GA --from-agent-dir /store/jonbuilds/JON3.1.2/agent/rhq-agent --run-data-migrator do-it )

-Observe the stack trace at the end which shows:
com.datastax.driver.core.exceptions.InvalidQueryException: unconfigured columnfamily metrics_index

Actual results:

InvalidQueryException

Expected results:

Successful data migration

Additional info:

After upgrade and starting the JBoss ON 3.3 DR01 sever, running the data migration tool shows the same stack trace.

Comment 3 Jay Shaughnessy 2014-09-18 17:18:22 UTC
master commit 942bc49bd492aab8191affdd662ffbb745ce4ce6
Author: Stefan Negrea <snegrea>
Date:   Wed Sep 17 11:10:16 2014 -0500

    [BZ 1126410] Update data migrator to use the latest storage node schema.

master commit d1a36215cac49f8ce2e375b34f93aee0a1e2adfe
Author: Stefan Negrea <snegrea>
Date:   Thu Sep 18 12:06:19 2014 -0500

    [BZ 1126410] Minor updates based on code review.



release/jon3.3.x commit 1f359eacee02d20ca9a8f5fe8dfecd3d032e4ca0
Author: Stefan Negrea <snegrea>
Date:   Wed Sep 17 11:10:16 2014 -0500

    (cherry picked from commit 942bc49bd492aab8191affdd662ffbb745ce4ce6)
    Signed-off-by: Jay Shaughnessy <jshaughn>

release/jon3.3.x commit 18bbbaafbc7ae302f7e5aa0f9779c888fb21c8c5
Author: Stefan Negrea <snegrea>
Date:   Thu Sep 18 12:06:19 2014 -0500

    (cherry picked from commit d1a36215cac49f8ce2e375b34f93aee0a1e2adfe)
    Signed-off-by: Jay Shaughnessy <jshaughn>

Comment 4 Stefan Negrea 2014-09-19 15:56:49 UTC
The data migrator has been updated to migrate the data to the latest storage node schema. The major changes in the schema are: a single column family for all the aggregate data, and a different metrics aggregation index table.

Comment 5 Simeon Pinder 2014-10-01 21:33:25 UTC
Moving to ON_QA as available for test with build:
https://brewweb.devel.redhat.com/buildinfo?buildID=388959

Comment 6 Sunil Kondkar 2014-10-07 10:37:27 UTC
Verified on JON 3.3 ER04

Upgrading from JON3.1.2 to JON3.3 ER04 with run-data-migrator option is successful.


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