Bug 1084427

Summary: No stop related info shows in $cartridge.log when stop for jboss app
Product: OpenShift Online Reporter: Lei Zhang <lzhang>
Component: ImageAssignee: Michal Fojtik <mfojtik>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: jdetiber, mfojtik, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1108058 1131190 (view as bug list) Environment:
Last Closed: 2015-02-18 16:50: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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1108058, 1131190    

Description Lei Zhang 2014-04-04 10:21:19 UTC
Description of problem:
Create one jbossew/jbosseap app(e.g., myjbossew10), tailf app-root/logs/$cartridge.log in gear and stop app, found no stop related info shows in $cartridge.log file.


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

How reproducible:
always

Steps to Reproduce:
1.Create one jboss app
#rhc app create myjbossews10 jbossews-1.0
2.Open Terminal:1 and tailf app-root/logs/$cartridge.log in gear
#
3.Open Terminal:2 and stop app
#rhc app stop myjbossew10
4.Check app-root/logs/$cartridge.log in Terminal:1


Actual results:
No stop related info shows in $cartridge.log when stop app

Expected results:
Should have stop info when stop app in log

Additional info:
===========This is previous log=======================
[33m2014/03/04 05:38:36,343 INFO  [org.hornetq.ra] (ServerService Thread Pool -- 71) HQ151003: HornetQ resource adaptor stopped  
[0m
[33m2014/03/04  05:38:36,716 INFO  [org.jboss.as.server.deployment] (MSC service thread  1-1) JBAS015877: Stopped deployment ROOT.war (runtime-name: ROOT.war) in  588ms  
[0m
[33m2014/03/04  05:38:36,871 INFO  [org.hornetq.core.server] (ServerService Thread Pool  -- 74) HQ221002: HornetQ Server version 2.3.13.Final (2.3.123, 123)  [d0c9e9ba-a388-11e3-8827-f96303d1f615] stopped  
[0m
[33m2014/03/04  05:38:36,880 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015950:  JBoss EAP 6.2.1.GA (AS 7.3.1.Final-redhat-3) stopped in 738ms

Comment 1 Balazs Varga 2014-08-18 13:07:38 UTC
The problem is that we send SIGKILL instead of SIGTERM to the processes, see:
https://github.com/openshift/origin-server/blob/a9c5419101392a72f0429da3c66db55c1b71e5be/cartridges/openshift-origin-cartridge-jbossews/bin/control#L103

I'm going to talk about this with Dan Mace why was this necessary.

Comment 2 openshift-github-bot 2014-08-18 20:41:39 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/66b7e9eb9eeb3a4666f3ad23becbe1662c1d9679
Bug 1084427 - Stop JBossEws cartridge gracefully

Replace SIGKILL with SIGTERM and a fallback to force kill the
processes after a timeout.
See other jboss carts for reference.

Comment 3 Lei Zhang 2014-08-19 03:06:39 UTC
Verified on devenv_5089, after stop/start/restart app, related info in log file will show. 

==============tailf app-root/logs/jbossews.log==============
Aug 19, 2014 2:59:33 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-127.1.244.1-8080
Aug 19, 2014 2:59:34 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Aug 19, 2014 2:59:34 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-127.1.244.1-8080

Comment 5 Jason DeTiberus 2014-10-08 02:18:01 UTC
Looks like this shipped with sprint 50, any reason it isn't closed?