Bug 1016977 - [deploy]deploy and post_deploy hooks do not work
Summary: [deploy]deploy and post_deploy hooks do not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Mace
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 05:45 UTC by Zhe Wang
Modified: 2015-05-14 23:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:34:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.