Bug 999232

Summary: "pre_start" commit hook not called as part of a restart operation
Product: OpenShift Online Reporter: Andrew Lee Rubinger <alr>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.xCC: dmcphers
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-21 14:53:16 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:

Description Andrew Lee Rubinger 2013-08-21 01:01:37 UTC
Description of problem:

pre_start action hook is not called on "ctl_app restart" or other restart methods.


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


How reproducible:


Steps to Reproduce:
1. Create an executable action hook in .openshift/action_hooks/pre_start_jbosseap (for instance for the EAP cartridge)
2. Put an echo statement in the pre_start action hook
3. Start the server, observe the echo statement
4. Restart the server, either via the Web UI or via SSH to "ctl_app restart".  Observe no echo statement from the action hook

Actual results:

pre_start action hook is not called on restart.

Expected results:

I would expect "restart" to be a composition of "stop" plus "start", not a separate lifecycle event.

Note line 19 of the following pastebin, which is not observed on restart but is on manual stop/start cycle:  http://pastebin.com/HMs134rP

Comment 1 Jhon Honce 2013-08-21 14:53:16 UTC
The pre_restart hook is called.  If you wish to re-use your pre_start script you should call it from the pre_restart hook.


The reason for this is restart is not always stop/start in all cartridges.