----- Original Message -----
From: "Larry O'Leary" <loleary(a)redhat.com>
To: rhq-devel(a)lists.fedorahosted.org
Sent: Wednesday, May 14, 2014 6:37:47 PM
Subject: Re: [BZ 1069648] Synchronize JVM heap arguments between in EAP standalone.conf
On Wed, 2014-05-14 at 17:07 -0400, Stefan Negrea wrote:
> Hello Everybody,
>
> I've been working on a design for synchronizing JVM heap arguments between
> RHQ and managed JBoss AS7 standalone.conf. On the surface this is looks
> like a simple task but it is far more complicated because of stability and
> security implications. I got a few ideas on how to accomplish this and
> then had a design session with Thomas. We narrowed it down to two options
> (see below) but in the end I think only one is really possible to
> implement.
>
> BZ -
https://bugzilla.redhat.com/show_bug.cgi?id=1069648
>
> The issue:
> 1) The BZ is applicable only to standalone servers. Domain mode has a very
> nice built-in mechanism to update JVM settings (already implemented in
> RHQ).
> 2) The official way to update JVM settings in standalone is via
> configuration files:
>
https://docs.jboss.org/author/display/AS7/JVM+settings
> 3) JVM settings are stored in two platform dependent files: standalone.conf
> and standalone.conf.bat
> 4) The configuration files have logic in them, shell and batch logic.
> 5) The configuration files are sourced in the start scripts.
> 6) Users can update these files outside of RHQ and they can have really
> important information
> 7) So far the AS7 plugin does not touch these files
An issue that you have not mentioned and that may complicate this
further is that the file is not always standalone.conf or
standalone.conf.bat.
Instead, this file is defined by the variable RUN_CONF.
For example: RUN_CONF=/etc/jboss/mainapp-env.conf
"${JBOSS_HOME}/bin/standalone.sh -c mainapp.xml &
Completely forgot about this one. Since we are talking about starting AS7 from RHQ the
only way to override RUN_CONF is by setting a system environment variable or adding it to
"Start Script Environment Variables" in connection settings of the resource. The
only place RHQ does not have any control is the system environment variable. For RHQ
connection settings, I would put a warning. Do you think a warning would sufficiently
mitigate this?
As for a way to get around this, it makes sense that AS would support
configuration file chaining or provide a conf.d directory that would get
sourced. Thus allowing the AS7 plug-in to add its configuration file to
the chain and provide a means of keeping configuration synced?
If this is implemented in AS7 then there needs to be a clear way to set the sourcing
order. Otherwise RHQ would trample or be trampled by the rest of the config scripts. Right
now there is logic to skip sections of the config scripts on both platforms.
Could we influence the WildFly community to add this capability?
We need to explore this but I am not sure it will happen in a decent timeframe for the
next RHQ release. And if we do try to influence them I would like to go a step forward and
have an official DMR API to change these settings. That would be the ideal solution.
Updating random files on disk is very risky and error prone since the user can change
those files outside of RHQ for custom configuration anyways.
--
Larry O'Leary
https://plus.google.com/+LarryOLeary
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel