new automatic startup reconfig

Larry O'Leary loleary at redhat.com
Tue Jan 8 15:36:47 UTC 2013


On Tue, 2013-01-08 at 10:13 -0500, John Mazzitelli wrote:
> In the old RHQ Server impl that ran inside JBossAS 4, whenever you changed rhq-server.properties, all you needed to do was restart the server and the new configuration values were automatically picked up (because we passed to JBoss the option -Prhq-server.properties and all services had configuration values like ${rhq.server.http.port}). Very handy - a one-stop-shop for all RHQ configuration in a single .properties file.
> 
> AS7.1.1.Final has a few problems with not supporting expressions (e.g. ${prop}) in some subsystem configurations (as they did in the older JBossAS 4). See https://issues.jboss.org/browse/AS7-6120 - so what this means is, changing rhq-server.properties after the initial installation was done does nothing - new values have no effect (this only effects some config properties but not all).
> 
> To work around this, the installer now supports the command line option "--reconfig" - if you ever change rhq-server.properties, after you restart the server, you must run "rhq-installer.sh --reconfig" to have the new values take effect. This, in turn, causes the AS7 to restart itself (because some of these change in values require the AS7 to reload its services).
> 
> Of course, this means users have to remember to do this (assuming they even know they have to do this in the first place!). Obviously, not ideal.
> 
> So, until these AS7 problems are fixed (and I think some already are in some newer AS7 builds), our production builds will ship rhq-server.sh (and .bat) with an extra call to "rhq-installer.sh --reconfig" in it. So, when you start the server, you will always be spawning a second Java process - the installer in reconfig mode - and it will look to see if your server needs to be reconfigured and if it does will reconfigure AND RESTART the server.
> 
> What does this mean? When you restart the server, you will see some messages come out on the console saying something like "reconfiguring server" or "everything is OK, nothing needs to be reconfigured". If you did change values in the .properties file that requires a restart, you'll notice the server immediately shutdown and restart. So the server will look like it went into fits :)
> 
> The hope is that we can eventually get rid of the entire "reconfig" stuff once that AS7 JIRA is resolved. Once AS7 supports expressions where we need them, we can remove the --reconfig code from the installer and we can remove this extra JVM we spawn from rhq-server script. But until then, we'll have to deal with this.

Sounds harmless except for the strange messages a user may see. Is it
the startup script that is running the installer with the --reconfig
before starting the server or is this just part of our server startup
process? In other words, is there a startup method that might
accidentally bypass this --reconfig step?

-- 
Larry O'Leary
https://plus.google.com/u/0/112645929986009801513



More information about the rhq-devel mailing list