Bug 1016977

Summary: [deploy]deploy and post_deploy hooks do not work
Product: OpenShift Online Reporter: Zhe Wang <zhewang>
Component: ContainersAssignee: Dan Mace <dmace>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: agoldste, dmace, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-17 13:34:10 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:

Description Zhe Wang 2013-10-09 05:45:15 UTC
Description of problem:
After adding a deploy hook and a post_deploy hook (http://openshift.github.io/documentation/oo_user_guide.html#the-openshift-directory) making them executable, they won't be executed during deployment. This failure covers all cartridges. But build hook works normally.

On the other hand, there is no such problem in devenv-stage_488 and INT(devenv-stage_488).

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

How reproducible:
always

Steps to Reproduce:
1. create an app

2. create a deploy hook with the following content, and make it executable
#! /bin/bash
echo "deploy test"

3. create a post_deploy hook and make it executable
#! /bin/bash
echo "post_deploy test"

4. push the change

Actual results:
The deployment succeeded:

remote: Preparing build for deployment
remote: Prepared deployment artifacts in /var/lib/openshift/5254cd6d86d4b7214900008a/app-deployments/2013-10-08_23-31-15.603
remote: Deployment id is 0197ac0e
remote: Activating deployment
remote: Result: success
remote: Activation status: success
remote: Deployment completed


But the strings, "deploy test" and "post_deploy hook" were not printed in the console output.

Expected results:
The deploy and post_deploy hooks should be executed.

Additional info:

Comment 1 Andy Goldstein 2013-10-09 14:37:37 UTC
FYI, I just tested this, and the hooks are executed, but their output is not printed to STDOUT.

Comment 3 openshift-github-bot 2013-10-09 20:45:05 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/3a5ae56cb5f578b4b0bb1f39c423db3debe30dad
Bug 1016977: Support stream output during interactive activation

Comment 4 Zhe Wang 2013-10-10 06:54:25 UTC
Verified this bug in devenv_3880:

remote: Prepared deployment artifacts in /var/lib/openshift/52564a7f19f189cc500003a1/app-deployments/2013-10-10_02-53-24.574
remote: Deployment id is 4babef15
remote: Activating deployment
remote: deploy test
^^^^^^^^^^^^^^^^^^^
remote: post_deploy test
^^^^^^^^^^^^^^^^^^^^^^^^
remote: Result: success
remote: Activation status: success
remote: Deployment completed