Bug 834315 - document when autoinstall options in rhq-server.properties will not work
document when autoinstall options in rhq-server.properties will not work
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Documentation (Show other bugs)
3.0.0
Unspecified Unspecified
medium Severity low (vote)
: ---
: JON 3.1.1
Assigned To: Deon Ballard
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-21 10:20 EDT by John Mazzitelli
Modified: 2013-09-03 11:02 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 805365
Environment:
Last Closed: 2013-09-03 11:02:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description John Mazzitelli 2012-06-21 10:20:38 EDT
+++ This bug was initially created as a clone of Bug #805365 +++

Description of problem:

The rhq-server.properties options

rhq.autoinstall.enabled=true
rhq.autoinstall.database=overwrite

do not seem to work.

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

This is related to JON with the following version/build
Version: 3.0.0.GA
Build Number: e23441b:1ca6ad9

How reproducible:

Steps to Reproduce:
1. Install JON
2. Stop JON
3. Edit ${JON_INSTALL_DIR}/bin/rhq-server.properties
4. Ensure the following are set:
rhq.autoinstall.enabled=true
rhq.autoinstall.database=overwrite
4. Delete some tables from the database
5 Start JON
  
Actual results:
The following exception occurs:

java.sql.SQLException: ORA-00942: table or view does not exist

Expected results:
I expect JON to reinstall automatically and overwrite the database tables as documented at

http://www.rhq-project.org/display/JOPR2/Running+The+Installer#RunningTheInstaller-AutoInstallation

Maybe this is not intended to work for re-installations - but I think that should be explicit in the documentation.

Additional info:

Server info:
Linux xxxxx 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

Java Info:
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-x86_64)
OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

Oracle Info:
Oracle 10g via thin JDBC connection

Let me know if you need more information, 

Cheers!

--- Additional comment from mfoley@redhat.com on 2012-03-26 11:57:45 EDT ---

medium, no target release 

per bz triage (crouch, mfoley, asantos, loleary)

--- Additional comment from hrupp@redhat.com on 2012-06-21 09:23:55 EDT ---

Mazz, 
is this supposed to work?

--- Additional comment from mazz@redhat.com on 2012-06-21 09:38:58 EDT ---

(In reply to comment #2)
> Steps to Reproduce:
> 1. Install JON
> 2. Stop JON
> 3. Edit ${JON_INSTALL_DIR}/bin/rhq-server.properties
> 4. Ensure the following are set:
> rhq.autoinstall.enabled=true
> rhq.autoinstall.database=overwrite
> 4. Delete some tables from the database
> 5 Start JON

I think this is a misunderstanding of the auto-installer.

First, let me define some terms to make things clear. I will update the wiki docs with the following information to make sure the docs are more clear and more understandable.

1) Server Distribution - this is the zip distro file.
2) Installed Server Distribution - this is the Server Distribution that has been unzipped and all the server's files are located in some server installation directory that we will call <install-dir>. For example, the "Installed Server Distribution" has files like "<install-dir>/bin/rhq-server.sh" and directories like "<install-dir>/jbossas".
3) GUI Installer - this is the webapp installer.   When you run the Installed Server Distribution as it came out of box and you point a browser to localhost:7080, this is the installer you will see. You can go through the GUI Installer to install the server.
4) Auto-Installer - if you don't want to use the GUI Installer, prior to running the Installed Server Distribution, you can tweek the <install-dir>/bin/rhq-server.properties as you state above in replication procedures, and then run it. The running Installed Server Distribution will then kick off the Auto-Installer. 

Now, the Auto-Installer (as well as the GUI Installer) is only available the FIRST time you run the Installed Server Distribution. Once either the GUI Installer or Auto-Installer has finished, both the Auto-Installer and GUI Installer are turned off for the lifetime of that Installed Server Distribution.

You cannot change the properties "rhq.autoinstall.*" and expect the auto-installer to run after the GUI Installer or Auto-Installer already finished. Think about it - if that were the case, if you set "rhq.autoinstall.enabled=true", the auto-installer would run everytime you started the Installed Server Distribution! Unless, of course, you remembered to go back and re-edit that .properties file and turn it back off.

But, be that as it may, the point is - the GUI Installer and Auto-Installer are turned off once either one of those finishes the first time.

But you CAN do what you want. What you need to do is shutdown and then delete the Installed Server Distribution (via "<installed-dir>/bin/rhq-server.sh stop & rm -rf <installed-dir>" for example). Then you can unzip the Server Distribution again in the same <install-dir> location. At this point, you have a new Installed Server Distribution whose installers have not been run and are enabled. You can then go into rhq-server.properties, change it as you have above, and then run the new Installed Server Distribution.

--- Additional comment from mazz@redhat.com on 2012-06-21 10:19:10 EDT ---

I added this to the auto-installer wiki page:

https://docs.jboss.org/author/display/RHQ/Running+The+Installer#RunningTheInstaller-AutoInstallation

"Also note that the auto-installer will only work the first time you start the server. Once you complete the installation (either via the auto-installation procedure or via the GUI installer), the rhq.autoinstall.* settings will be ignored and the auto-installer will be disabled. If you wish to re-install the server, you must remove the currently installed server files, unzip the original server distribution and repeat the steps as if you are installing the server for the first time."
Comment 1 John Mazzitelli 2012-06-21 10:22:04 EDT
deon - we need to avoid the confusion that is illustrated by this BZ. We need to add something to the JON docs re: when the auto-installer will and won't work.

See my comments in the description here. Feel free to alter as you see fit for the JON docs.
Comment 2 John Sanda 2012-08-29 21:49:31 EDT
The CR1 build is available at
https://brewweb.devel.redhat.com/buildinfo?buildID=231258. Moving to ON_QA.
Comment 3 Heiko W. Rupp 2013-09-03 11:02:52 EDT
Bulk closing of old issues in VERIFIED state.

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