[jboss-as7-dev] Domain mode server launch command

John O'Hara johara at redhat.com
Tue Aug 14 12:49:54 EDT 2012


When running AS7 in a domain, we need to be able to bind each host to 
explicit numa nodes when the process is launched. We need to be able to 
insert a numa command before the java command for each server process 
that is launched by the HostController. The numa command needs to be 
configurable for each host, i.e. we might want to bind hosts to 
different numa nodes or the same numa node.

Another use case that I am aware of is running the server process under 
a different user account to the HostController, e.g. prefixing the java 
command with something like "sudo joe java"

Having thought about our use case and a use case where the host should 
start start under a different account , a possible solution could be to 
modify the AS config schema to allow a generic "launch command" for each 
server entity, so that the host.xml would look something like;

          <server name="server-one" group="main-server-group" 
launchCommand="numactl --membind 0 --cpubind 0"/>
          <server name="server-two" group="main-server-group" 
auto-start="true" launchCommand="numactl --membind 1 --cpubind 1">
              <!-- server-two avoids port conflicts by incrementing the 
ports in
                   the default socket-group declared in the server-group 
-->
              <socket-bindings port-offset="150"/>
          </server>
          <server name="server-three" group="main-server-group" 
auto-start="true" launchCommand="sudo joe">
              <!-- server-two avoids port conflicts by incrementing the 
ports in
                   the default socket-group declared in the server-group 
-->
              <socket-bindings port-offset="150"/>
          </server>

If a launchCommand attribute was defined for a server, you could parse 
the attribute value and add the parsed commands to the ProcessBuilder 
before the java command.

The main difficulty would be validating any commands added in 
launchCommand attribute, not sure how problematic this would be?

Regards,

John

-- 
John O'Hara
johara at redhat.com

JBoss, by Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).



More information about the jboss-as7-dev mailing list