Bug 1043819

Summary: Hot_deploy doesn't work for nodejs app
Product: OpenShift Online Reporter: Yan Du <yadu>
Component: ImageAssignee: Ben Parees <bparees>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bparees, lxia
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-14 21:34:40 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 Yan Du 2013-12-17 09:46:49 UTC
Description of problem:
create a nodejs app and add hot_deploy, after push, the PID changed



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



How reproducible:
Always



Steps to Reproduce:

1. Create a nodejs(nodejs-0.6 or nodejs-0.10) app
rhc app create nd10 nodejs-0.10
2. In app repo, add hot_deploy then git push
touch .openshift/markers/hot_deploy
3. Change something again and git push
4. Check the change and the PID




Actual results:

step3:
The output as below is confuesed. both "remote: Not starting cartridge nodejs because hot deploy is enabled" and "remote: Starting NodeJS cartridge" shown.

step4:
supervisor PID changed after push.
remote: Deployment id is c8db0a5d
remote: Activating deployment
remote: Not starting cartridge nodejs because hot deploy is enabled
remote: Starting NodeJS cartridge
remote: 
remote: DEBUG: Running node-supervisor with
remote: DEBUG:   program 'server.js'
remote: DEBUG:   --watch '.'
remote: DEBUG:   --ignore 'undefined'
remote: DEBUG:   --extensions 'node|js|coffee'
remote: DEBUG:   --exec 'node'
remote: 
remote: DEBUG: Starting child process with 'node server.js'
remote: DEBUG: Watching directory '/var/lib/openshift/52b00bc503ef64f0aa0001c4/app-root/runtime/repo' for changes.
remote: Warning: express.createServer() is deprecated, express
remote: applications no longer inherit from http.Server,
remote: please use:
remote: 
remote:   var express = require("express");
remote:   var app = express();
remote: 
remote: Tue Dec 17 2013 03:36:34 GMT-0500 (EST): Node server started on 127.12.191.1:8080 ...
remote: Result: success
remote: Activation status: success
remote: Deployment completed with status: success



Expected results:

1. App will not restart since hot_deploy is enable, supervisor PID will not change
2. Should not show the confuesed message in output.



Additional info:
hot-deploy works normally with existed app on INT

Comment 1 Liang Xia 2013-12-18 06:51:25 UTC
This can be reproduced on devenv_4148.

Comment 2 Ben Parees 2014-01-14 21:34:40 UTC
Though the symptoms are not the same, this is broken for the same reason as 1048756 which is that the "tee" command added to the end of the supervisor invocation was altering the behavior and causing the supervisor process to die unexpectedly.  

I was already in the process of fixing 1048756 when I noticed this bug report, so i'm duping it to the one I was already delivering the fix on.

*** This bug has been marked as a duplicate of bug 1048756 ***