Bug 1150914

Summary: Clean installation fails with ERROR: relation "rhq_storage_node" does not exist
Product: [Other] RHQ Project Reporter: Filip Brychta <fbrychta>
Component: InstallerAssignee: Nobody <nobody>
Status: VERIFIED --- QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.13CC: hrupp
Target Milestone: ---   
Target Release: RHQ 4.13   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Filip Brychta 2014-10-09 07:46:42 UTC
Description of problem:
$Summary

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

How reproducible:
Always

Steps to Reproduce:
1. have a clean database
2. unzip rhq-server-4.13.0-SNAPSHOT.zip
3. cd rhq-server-4.13.0-SNAPSHOT/bin/
4. ./rhqctl install


Actual results:
03:26:06,828 INFO  [org.jboss.modules] JBoss Modules version 1.3.0.Final-redhat-2

The [rhq.autoinstall.server.admin.password] property is required but not set in [rhq-server.properties].
Do you want to set [rhq.autoinstall.server.admin.password] value now?
yes|no: yes
rhq.autoinstall.server.admin.password (enter as plain text): 
Confirm:
rhq.autoinstall.server.admin.password (enter as plain text): 

The [jboss.bind.address] property is required but not set in [rhq-server.properties].
Do you want to set [jboss.bind.address] value now?
yes|no: yes
jboss.bind.address: 0.0.0.0
Is [0.0.0.0] correct?
yes|no: yes
03:26:24,152 INFO  [org.rhq.server.control.command.Install] Preparing to install RHQ storage node.
Starting RHQ Storage Installer ...
03:26:24,899 INFO  [org.jboss.modules] JBoss Modules version 1.3.0.Final-redhat-2
03:26:25,120 INFO  [org.rhq.storage.installer.StorageInstaller] Running RHQ Storage Node installer...
03:26:25,174 INFO  [org.rhq.storage.installer.StorageInstaller] Checking perms for ../../../rhq-data/saved_caches
03:26:25,175 INFO  [org.rhq.storage.installer.StorageInstaller] Checking perms for ../../../rhq-data/commit_log
03:26:25,175 INFO  [org.rhq.storage.installer.StorageInstaller] Checking perms for ../../../rhq-data/data
03:26:25,178 INFO  [org.rhq.cassandra.Deployer] Unzipping storage node to /home/hudson/rhq-server-4.13.0-SNAPSHOT/rhq-storage
03:26:25,606 INFO  [org.rhq.cassandra.Deployer] Applying configuration changes to /home/hudson/rhq-server-4.13.0-SNAPSHOT/rhq-storage/conf/cassandra.yaml
03:26:25,764 INFO  [org.rhq.cassandra.Deployer] Applying configuration changes to /home/hudson/rhq-server-4.13.0-SNAPSHOT/rhq-storage/conf/log4j-server.properties
03:26:25,773 INFO  [org.rhq.cassandra.Deployer] Applying configuration changes to /home/hudson/rhq-server-4.13.0-SNAPSHOT/rhq-storage/conf/cassandra-jvm.properties
03:26:25,798 INFO  [org.rhq.cassandra.Deployer] Updating file permissions in /home/hudson/rhq-server-4.13.0-SNAPSHOT/rhq-storage/bin
03:26:25,806 INFO  [org.rhq.storage.installer.StorageInstaller] Updating rhq-server.properties...
Exception in thread "main" java.lang.RuntimeException: Unable to update Storage Node [last-rhq-server.bc.jonqe.lab.eng.bos.redhat.com] to version [4.13.0-SNAPSHOT]
	at org.rhq.storage.installer.StorageInstaller.updateStorageNodeVersion(StorageInstaller.java:1046)
	at org.rhq.storage.installer.StorageInstaller.stampStorageNodeVersion(StorageInstaller.java:999)
	at org.rhq.storage.installer.StorageInstaller.run(StorageInstaller.java:283)
	at org.rhq.storage.installer.StorageInstaller.main(StorageInstaller.java:1093)
	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:616)
	at org.jboss.modules.Module.run(Module.java:292)
	at org.jboss.modules.Main.main(Main.java:455)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "rhq_storage_node" does not exist
  Position: 15
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
	at org.rhq.core.db.DatabaseType.checkColumnExists(DatabaseType.java:249)
	at org.rhq.storage.installer.StorageInstaller.updateStorageNodeVersion(StorageInstaller.java:1027)
	... 9 more
03:26:26,501 INFO  [org.rhq.server.control.command.Install] The storage node installer has finished with an exit value of 1

Expected results:
RHQ is installed without errors

Additional info:
Last working rhq build 1df956d

Comment 1 Michael Burman 2014-10-09 08:37:30 UTC
Fixed in master:

commit a6ac0b9a43a330f43bc6c160410807e988e6228f
Author: Michael Burman <miburman>
Date:   Thu Oct 9 11:25:20 2014 +0300

    [BZ 1139735] Storage node schema version should not be attempted to upgrade in case of clean installation

Comment 2 Filip Brychta 2014-10-10 06:38:29 UTC
Verified on
4.13.0-SNAPSHOT
Build Number :	
6ba1d1b