Red Hat Bugzilla – Bug 1265740
(6.4.z) Provided init.d scripts do not allow to easily fire several instances on the same system
Last modified: 2016-11-10 15:36:31 EST
Description of problem:
When creating multiple services (i.e. 2 domain controllers on the same host, we are unable to do so without modifying the init.d jboss-as-domain.sh script. Also the service script doesn't provide options on passing system properties in.
Steps to Reproduce:
1. Copy the domain directory in the JBOSS eap ZIP installation to a new directory called domain_2 on the same level
2. Copy the init.d script from jboss-as-domain to jboss-as-domain2
3. The server won't sstart up with the right configuration
To be able to point the service startup script through the configuration without having to modify the actual script instance.
I'm attaching a generic implementation of the script that would allow above and a specific example of my jboss-as.conf file.
This is an example on how it could work
# General configuration for the init.d scripts,
# not necessarily for JBoss AS itself.
# The username who should own the process.
# The amount of time to wait for startup
# The amount of time to wait for shutdown
# Location to keep the console log
JBOSS_STARTUP_OPTIONS=" -bmanagement $JBOSS_MANAGEMENT_ADDR -Djboss.domain.base.dir=$JBOSS_DOMAIN_BASE_DIR -Djboss.management.native.port=$JBOSS_MANAGEMENT_NATIVE_PORT -Djboss.management.http.port=$JBOSS_MANAGEMENT_HTTP_PORT"
Created attachment 1076262 [details]
Proposed fix of the init.d script
As discussed over IRC, I've looked at your script, and while it's quite handy to have all the instance related files (pidfile, log) using the name of the script, I'm not sure this change is needed. I think the script offer to replace those value by simply overriding the associate variable.
So technically, you can simply create a file /etc/init.d/jboss-1 which override the appropriate variables and then call the provided init scripts.
Now with your approach, you don't need to have all those overrides, which can be quite nice. I therefore I've created an issue on Wildfly - let's see other people feels about this proposals. If it's get merged, we'll see about backporting it to EAP.
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see email@example.com with any questions
Romain Pelisse <firstname.lastname@example.org> updated the status of jira JBEAP-3444 to Coding In Progress
Marek Kopecký <email@example.com> updated the status of jira JBEAP-3444 to Reopened
Marek Kopecký <firstname.lastname@example.org> updated the status of jira JBEAP-3444 to Resolved
Jiri Pallich <email@example.com> updated the status of jira JBEAP-3444 to Closed