Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900752 (JBPAPP6-1099)

Summary: EAP 6 RPM - /etc/init.d/jbossas-domain script should allow a host config file to specified
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Farah Juma <fjuma>
Component: BuildAssignee: Permaine Cheung <pcheung>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: dpospisi, fjuma, pcheung
Target Milestone: ---   
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1099
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-20 10:56:22 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
init.d-jbossas-domain.patch
none
sysconfig-jbossas-domain.patch
none
jbossas-domain.patch none

Description Farah Juma 2012-08-01 18:56:06 UTC
project_key: JBPAPP6

Currently, there's no way to specify a host configuration file to use when starting the jbossas-domain service. Right now, the user can only specify a domain configuration file via the JBOSS_SERVER_CONFIG variable.

Comment 1 Farah Juma 2012-08-01 19:11:14 UTC
I've attached a patch for /etc/init.d/jbossas-domain that allows a host config file to be specified via a new JBOSS_HOST_CONFIG variable in /etc/sysconfig/jbossas-domain.

For example, a user could specify the following in /etc/sysconfig/jbossas-domain:

JBOSS_HOST_CONFIG="host-slave.xml"


Comment 2 Farah Juma 2012-08-01 19:11:14 UTC
Attachment: Added: init.d-jbossas-domain.patch
Attachment: Added: sysconfig-jbossas-domain.patch


Comment 3 Permaine Cheung 2012-08-02 12:41:14 UTC
Thanks for the patch Farah, will put this in 6.0.1.

Comment 4 Permaine Cheung 2012-09-13 12:42:49 UTC
Fix committed, will be in EAP 6.0.1 ER2.

Comment 5 Farah Juma 2012-09-25 18:12:57 UTC
Permaine, when testing the jbossas-domain init script with ER2, I noticed that the "CMD_START" variable didn't get updated to include the --host-config option. I've attached a patch (jbossas-domain.patch) to fix this (the patch just makes sure that the --host-config option gets appended to JBOSSSH before CMD_START variable is created). 

jbossas-domain.patch needs to be applied to the /etc/init.d/jbossas-domain script.

Comment 6 Farah Juma 2012-09-25 18:12:57 UTC
Attachment: Added: jbossas-domain.patch


Comment 7 Farah Juma 2012-09-25 19:17:16 UTC
As we discussed, the only change is that the JBOSS_HOST_CONFIG if statement needs to be above the JBOSS_SERVER_CONFIG if statement in the jbossas-domain init script as shown below:

...
{code}
if [ ! -z $JBOSS_HOST_CONFIG ]; then
   JBOSSSH="$JBOSSSH --host-config=$JBOSS_HOST_CONFIG"
fi

if [ ! -z $JBOSS_SERVER_CONFIG ]; then
   CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH -c $JBOSS_SERVER_CONFIG"
else
   CMD_START="cd $JBOSS_HOME/bin; $JBOSSSH"
fi
{code}
...


Comment 8 Permaine Cheung 2012-09-26 18:26:26 UTC
Fix committed into distgit for both jbossas-{standalone,domain}, will be in the next ER handoff.
As a side note, it would be helpful to provide context diff rather than plain diff to see where the patch should be applied exactly.

Comment 9 Farah Juma 2012-09-26 18:51:27 UTC
Thanks, Permaine! I'll be sure to give a context diff in the future. Note that the JBOSS_HOST_CONFIG option is only relevant when running in domain mode.

Comment 10 Permaine Cheung 2012-09-27 13:10:46 UTC
Added fix to get rid of JBOSS_HOST_CONFIG in jbossas-standalone during install section so that we can still keep the sysconfig file and init script in sync for both jbossas-{standalone,domain}.

Comment 11 Misty Stanley-Jones 2012-11-05 05:28:01 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 12 Anne-Louise Tangring 2012-11-13 20:24:18 UTC
Release Notes Docs Status: Removed: Not Yet Documented 
Docs QE Status: Removed: NEW 


Comment 13 Dominik Pospisil 2012-11-20 10:56:22 UTC
Verified (ER3).