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.
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>
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.
Moving to ON_QA as available for test with build: https://brewweb.devel.redhat.com/buildinfo?buildID=388959
Verified on JON 3.3 ER04 Upgrading from JON3.1.2 to JON3.3 ER04 with run-data-migrator option is successful.