WARNING for JBoss AS7 users


#1

If you use JBoss AS 7.1.1 along with Chef, you should know that JBoss AS 7
will change the contents of your main XML configuration file on disk by
removing comments, adding or removing line breaks, and reordering
attributes.

If you have a jboss service resource that subscribes to that config file,
it will detect that the file and has changed and restart the service on
every chef-client run. I found this out the hard way

There is a pull request in to the jboss folks to resolve this issue,
allowing your to specify that the file on disk should not be changed w/ a
command-line argument like --initial-xx-config

https://github.com/jbossas/jboss-as/pull/2288

It took me 4 hours to diagnose this issue. what a PITA!

This may also apply to 7.1.0 but I am not sure


#2

On Thu, Jun 14, 2012 at 11:46 PM, Bryan Berry bryan.berry@gmail.com wrote:

If you use JBoss AS 7.1.1 along with Chef, you should know that JBoss AS 7
will change the contents of your main XML configuration file on disk by
removing comments, adding or removing line breaks, and reordering
attributes.

If you have a jboss service resource that subscribes to that config file, it
will detect that the file and has changed and restart the service on every
chef-client run. I found this out the hard way

This seems to be a problem that afflicts multiple java application
servers. In the glassfish space, both the message broker ad the
application server can rewrite their configuration files. I have had
to go to some lengths to parse the configuration files and check for
the values I want to specify as part of a resources guard. Have you
found a better way to do this?


Cheers,

Peter Donald


#3

I’m from the puppet-world and totally just lurking here (so forgive me
if I’m blabbering :slight_smile: ), but for Puppet there is augeas, which is a
standalone tool that can parse configuration files into machine
readable trees. This allows you to change/check the value of a
configuration parameter unrelated to where in the config file it
actually is. If i’m not mistaking this should solve your problem if
you can find a way to use it in Chef? http://augeas.net/

Hope this helps!

Walter Heck

On Fri, Jun 15, 2012 at 8:22 AM, Peter Donald peter@realityforge.org wrote:

On Thu, Jun 14, 2012 at 11:46 PM, Bryan Berry bryan.berry@gmail.com wrote:

If you use JBoss AS 7.1.1 along with Chef, you should know that JBoss AS 7
will change the contents of your main XML configuration file on disk by
removing comments, adding or removing line breaks, and reordering
attributes.

If you have a jboss service resource that subscribes to that config file, it
will detect that the file and has changed and restart the service on every
chef-client run. I found this out the hard way

This seems to be a problem that afflicts multiple java application
servers. In the glassfish space, both the message broker ad the
application server can rewrite their configuration files. I have had
to go to some lengths to parse the configuration files and check for
the values I want to specify as part of a resources guard. Have you
found a better way to do this?


Cheers,

Peter Donald


Walter Heck


Check out my startup: Puppet training and consulting @ http://www.olindata.com
Follow @olindata on Twitter and/or ‘Like’ our Facebook page at
http://www.facebook.com/olindata