Description of problem:
I created a jboss app on OpenShift Origin, but found that not able to change the jboss JVM settings, since the standalone.conf of jbossas-7/jbosseap-6 does not read node_profile from '/etc/stickshift/resource_limits.conf' at all
Steps to Reproduce:
1. create any one simple jboss app on OpenShift Origin,
2. start the app, you can see the JVM setting are of 'small' node_profile.
3. then try to modify the node_profile to medium in /etc/stickshift/resource_limits.conf,
4. restart the jboss app, we will see the JVM setting not change
Additional info:
the original code snippet for reading the node_profile in standalone.conf was:
resource_limits_file=`readlink -f /etc/stickshift/resource_limits.conf`
resource_limits_file_name=`basename $resource_limits_file`
node_profile=`echo ${resource_limits_file_name/*./}`
my workaround are here two options:
### option1:
source $resource_limits_file
### option2:
node_profile=`sed '/^\#/d' /etc/stickshift/resource_limits.conf | grep 'node_profile' | tail -n 1 | cut -d "=" -f2-`
# set node_profile as 'small' by default, if it not set
if test "x$node_profile" = "x"
then
node_profile=small
fi
echo "node_profile=$node_profile"

hi, Bill
i'm not suck at the JVM settings, my point is i would like to switch between 'small', 'medium', 'large' JVM settings.
from my understanding, by modifying the 'node_profile' in /etc/stickshift/resource_limits.conf can make the tricky (according what I read from the source code), but the problem is no matter what value for 'node_profile' i changed, the 'small' JVM setting was always used, that means the standalone.conf does not read 'node_profile' correctly
so I provided two options to read the 'node_profile' from resource_limits.conf

/etc/stickshift/resource_limits.conf is a link. It's linked to one the real file /etc/stickshift/resource_limits.conf.small. If you change the link so that /etc/stickshift/resource_limits.conf points to /etc/stickshift/resource_limits.conf.medium then the standalone.conf will use the medium gear profile settings (i.e. memory)

Thanks, Bill
yes, it works now after I created the /etc/stickshift/resource_limits.conf.medium, /etc/stickshift/resource_limits.conf.small, and created link file /etc/stickshift/resource_limits.conf point to /etc/stickshift/resource_limits.conf.medium.
but I'm just wondering why not create these conf profiles and link file by default? (in my case, the resource_limits.conf is a plain file not a link at all)

This allows us to create predefined profile settings and easily switch between then for the default gear size. You can also control the JVM settings by using the rhc --gear-size option when you create you application.
I'm going to close this bug, but please reach out to me at wdecoste@redhat.com on on IRC if you have any other questions.

Note

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