Bug 1020677

Summary: [QE] (6.3.0) Domain mode service script uses wrong string to verify if JBoss started
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Petr Kremensky <pkremens>
Component: Scripts and CommandsAssignee: Ivo Studensky <istudens>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.0CC: csutherl, fnasser, istudens, kkhan, pgier, rhatlapa, smumford
Target Milestone: ER2   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, it was found that the domain and standalone service scripts used an incorrect variable when determining if the server had started correctly. This could lead to inaccurate results when attempting to verify the server's state. This issue has been corrected in this release.
Story Points: ---
Clone Of:
: 1072845 (view as bug list) Environment:
Last Closed: 2014-06-28 15:24:44 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1072845    

Description Petr Kremensky 2013-10-18 07:35:09 UTC
Description of problem:
JBoss EAP 6.2.0 script uses "JBoss AS.*started in" string to verify if the JBoss started. It should be JBAS015874. Thus, it will work for different languages (and with EAP). 
Currently the service start() will success even if no "started in" message is found.
from JBoss EAP 6.2.0 jboss-as-domain.sh script:
start() {
...
  count=0
  launched=false

  until [ $count -gt $STARTUP_WAIT ]
  do
    grep 'JBoss AS.*started in' $JBOSS_CONSOLE_LOG > /dev/null
    if [ $? -eq 0 ] ; then
      launched=true
      break
    fi
    sleep 1
    let count=$count+1;
  done

  success
  echo
  return 0
}

Version-Release number of selected component (if applicable):
EAP 6.2.0.ER6

started log:
[Host Controller] 08:13:44,258 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-9) (Host Controller) started in 8766ms - Started 12 of 12 services (0 services are passive or on-demand)

Additional info:
Keep in mind that greping just JBAS015874 will return success once domain-controller is up, this doesn't mean that whole domain is up.
Original issue BZ1015237

Comment 1 Permaine Cheung 2013-10-18 12:48:32 UTC
Jason, please reassign accordingly.

When this is fixed in Wildfly, we'll need to merge the fix into the EAP branch.

Comment 2 Petr Kremensky 2014-02-17 13:11:25 UTC
This is same with jboss-as-standalone.sh script. Launched variable is ignored and script return success even if server failed to start once the timeout expires.

{ ...
  count=0
  launched=false

  until [ $count -gt $STARTUP_WAIT ]
  do
    grep 'JBAS015874:' $JBOSS_CONSOLE_LOG > /dev/null
    if [ $? -eq 0 ] ; then
      launched=true
      break
    fi
    sleep 1
    let count=$count+1;
  done

  success
  echo
  return 0
}

Comment 3 Ivo Studensky 2014-04-08 08:47:10 UTC
PR created:
https://github.com/jbossas/jboss-eap/pull/1199

Comment 4 Petr Kremensky 2014-04-28 06:38:50 UTC
Verified on EAP 6.3.0.ER2

Comment 5 Petr Kremensky 2014-07-09 11:17:52 UTC
*** Bug 1093497 has been marked as a duplicate of this bug. ***