Bug 1004740 - Hot_deploy is not working for nodejs-0.6 and nodejs-0.10 app
Summary: Hot_deploy is not working for nodejs-0.6 and nodejs-0.10 app
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: Fotios Lindiakos
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 11:39 UTC by Yan Du
Modified: 2015-05-14 23:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:49:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Yan Du 2013-09-05 11:39:42 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):
devenv_3745


How reproducible:
Always



Steps to Reproduce:
1. create a nodejs app
rhc app create nd10 nodejs-0.10
2. in app repo, add hot_deploy and change something in index.html, then git push
touch .openshift/markers/hot_deploy
3. check the change take effect
4. change something again and git push
5. check the change and the PID



Actual results:
step 2.

[root@Daphne nd10]# touch .openshift/markers/hot_deploy
[root@Daphne nd10]# vim index.html 
[root@Daphne nd10]# git add .; git commit -amp; git push
[master ee22231] p
 Committer: root <root@Daphne.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
 1 files changed, 1 insertions(+), 1 deletions(-)
 create mode 100644 .openshift/markers/hot_deploy
Counting objects: 9, done.
<-------------snip---------------------------------->
remote: Not starting cartridge nodejs because hot deploy is enabled
remote: hot_deploy marker found. Switching to using supervisor. Subsequent pushes won't require restart until the marker is removed.
remote: Stopping NodeJS cartridge
remote: Starting NodeJS cartridge
To ssh://52286342b2636ebd440001d3.rhcloud.com/~/git/nd10.git/
   c003025..ee22231  master -> master
  
 
step4:  

[root@Daphne nd10]# vim index.html 
[root@Daphne nd10]# git add .; git commit -amp; git push
[master 6e27f9b] p
 Committer: root <root@Daphne.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:
 1 files changed, 1 insertions(+), 1 deletions(-)
Counting objects: 5, done.
<------------------------snip--------------------------->
remote: npm info prepublish OpenShift-Sample-App.0
remote: npm info ok 
remote: Starting application nd10
remote: Not starting cartridge nodejs because hot deploy is enabled
remote: hot_deploy marker found. Switching to using supervisor. Subsequent pushes won't require restart until the marker is removed.
remote: Stopping NodeJS cartridge
remote: Starting NodeJS cartridge
To ssh://52286342b2636ebd440001d3.rhcloud.com/~/git/nd10.git/
   ee22231..6e27f9b  master -> master


step5,
the cartridge restarted when git push, and PID for node /opt/rh/nodejs010/root/usr/bin/supervisor changed


Expected results:
should not restart since adding the hot_depoy marker, and the PID will be keep the same ID


Additional info:

Comment 1 Fotios Lindiakos 2013-09-09 15:29:50 UTC
The logic for the NodeJS cart has changed slightly. Now it always uses the supervisor wrapper to launch `node`. When testing with hot_deploy, the main `supervisor` pid should not change, but it will launch a new `node` process.

PR is here and submitting shortly:
https://github.com/openshift/origin-server/pull/3564

Comment 2 Yan Du 2013-09-10 10:43:44 UTC
test devenv_3764, supervisor process PID keep the same ID after push. move the bug to verified.


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