Bug 1025050 - EAP 6 plug-in should not require start script environment variables to be set
EAP 6 plug-in should not require start script environment variables to be set
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6 (Show other bugs)
JON 3.1.2
Unspecified Unspecified
unspecified Severity low
: DR01
: JON 3.2.1
Assigned To: Thomas Segismont
Mike Foley
Depends On:
  Show dependency treegraph
Reported: 2013-10-30 16:51 EDT by Larry O'Leary
Modified: 2014-05-08 13:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-05-08 13:43:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 527693 None None None Never

  None (edit)
Description Larry O'Leary 2013-10-30 16:51:36 EDT
Description of problem:
When invoking the start operation on an EAP 6 server, the operation fails when the connection setting Start Script Environment Variables is not set. This prevents the target start script from building the environment as normally expected (JAVA_HOME, PATH, etc) and requires the JBoss ON administrator to dynamically edit these values depending on the target script. 

Furthermore, this results in RPM installed JBoss packages from being started without setting some dummy value for this setting.

Bottom line, there should be no requirement that any environment variables be defined. Environment variables are just that -- environment -- and can be set by the execution environment invoked by the target start script.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
#.  Start EAP 6 standalone server.
#.  Start JBoss ON 3.1.2 system.
#.  Import EAP 6 resources into inventory.
#.  Configure EAP 6 connection settings.
#.  Verify EAP server is reported as available.
#.  Unset _Start Script Environment Variables_ for EAP 6 server resource.
#.  Invoke the _Shutdown_ operation for the EAP 6 server resource.
#.  Invoke the _Start_ operation for the EAP 6 server resource.

Actual results:
Operation fails with the error message:
    java.lang.Exception: This Resource's connection properties contain errors: [No start script environment variables are set. At a minimum, PATH should be set (on UNIX, it should contain at least /bin and /usr/bin). It is recommended that JAVA_HOME also be set, otherwise the PATH will be used to find java.]
        at org.rhq.core.pc.operation.OperationInvocation.run(OperationInvocation.java:278)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)

Expected results:
Operation should succeed.

Additional info:
This appears to be due to some strange check on whether there is a value assigned to this connection property. I am not sure why it seemed necessary to perform such a check:

  1. the property value is optional
  2. the environment should only be used in default cases or when overrides are being sent to the script
Comment 1 Thomas Segismont 2014-01-30 06:34:11 EST
Fixed in master

commit 6785f80b99a4def0128939113fd5af7d3b4ebee5
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu Jan 30 12:30:48 2014 +0100
Comment 2 Jay Shaughnessy 2014-02-04 17:26:43 EST
release/jon3.2.x commit e3e8c936433ae9406bff0a6beb9735c476fce818
    Cherry-pick master 6785f80b99a4def0128939113fd5af7d3b4ebee5
    Signed-off-by: Jay Shaughnessy <jshaughn@redhat.com>
Comment 3 Simeon Pinder 2014-02-18 10:08:15 EST
Moving to ON_QA as available for testing in the following brew build:

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.
Comment 4 Sunil Kondkar 2014-02-21 08:53:07 EST
Verified on JON 3.2.1 DR01 build (Build Number :c758688:4c03150)

Followed the steps and verified that start operation is successful.
Comment 5 Mike Foley 2014-05-08 13:43:44 EDT
JON 3.2.1 released week of 5/5/2014

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