Bug 1025050 - EAP 6 plug-in should not require start script environment variables to be set
Summary: EAP 6 plug-in should not require start script environment variables to be set
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.1.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: DR01
: JON 3.2.1
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 20:51 UTC by Larry O'Leary
Modified: 2018-12-03 20:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-08 17:43:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 527693 0 None None None Never

Description Larry O'Leary 2013-10-30 20:51:36 UTC
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):
4.4.0.JON312GA

How reproducible:
Always

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 11:34:11 UTC
Fixed in master

commit 6785f80b99a4def0128939113fd5af7d3b4ebee5
Author: Thomas Segismont <tsegismo>
Date:   Thu Jan 30 12:30:48 2014 +0100

Comment 2 Jay Shaughnessy 2014-02-04 22:26:43 UTC
release/jon3.2.x commit e3e8c936433ae9406bff0a6beb9735c476fce818
    
    Cherry-pick master 6785f80b99a4def0128939113fd5af7d3b4ebee5
    Signed-off-by: Jay Shaughnessy <jshaughn>

Comment 3 Simeon Pinder 2014-02-18 15:08:15 UTC
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=336752

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 13:53:07 UTC
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 17:43:44 UTC
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.