Bug 1016977 - [deploy]deploy and post_deploy hooks do not work
[deploy]deploy and post_deploy hooks do not work
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Mace
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 01:45 EDT by Zhe Wang
Modified: 2015-05-14 19:29 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-17 09:34:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Zhe Wang 2013-10-09 01:45:15 EDT
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 10:37:37 EDT
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 16:45:05 EDT
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 02:54:25 EDT
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.