Bug 1265740

Summary: (6.4.z) Provided init.d scripts do not allow to easily fire several instances on the same system
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: ckyriaki
Component: Scripts and CommandsAssignee: Romain Pelisse <rpelisse>
Status: CLOSED EOL QA Contact: Marek Kopecky <mkopecky>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3.3CC: bmaxwell, ckyriaki, egonzale, fnasser, mkopecky, pcheung, pgier, pkremens
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:48:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Description Flags
Proposed fix of the init.d script none

Description ckyriaki 2015-09-23 15:45:24 UTC
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. 

How reproducible:
Every time

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

Actual results:

Expected results:
To be able to point the service startup script through the configuration without having to modify the actual script instance. 

Additional info:
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
cat /etc/jbossas-domain-appck/jboss-as.conf 
# 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_CONSOLE_LOG=/var/log/jboss-as/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"

Comment 1 ckyriaki 2015-09-23 16:09:18 UTC
Created attachment 1076262 [details]
Proposed fix of the init.d script

Comment 2 Romain Pelisse 2015-11-06 13:32:27 UTC
Hi Christina,

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.

Comment 10 Mike McCune 2016-03-28 23:30:47 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 11 JBoss JIRA Server 2016-04-04 13:45:49 UTC
Romain Pelisse <belaran> updated the status of jira JBEAP-3444 to Coding In Progress

Comment 12 JBoss JIRA Server 2016-06-09 13:36:40 UTC
Marek Kopecký <mkopecky> updated the status of jira JBEAP-3444 to Reopened

Comment 13 JBoss JIRA Server 2016-06-10 14:07:20 UTC
Marek Kopecký <mkopecky> updated the status of jira JBEAP-3444 to Resolved

Comment 14 JBoss JIRA Server 2016-08-23 11:38:50 UTC
Jiri Pallich <jpallich> updated the status of jira JBEAP-3444 to Closed