This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1004740 - Hot_deploy is not working for nodejs-0.6 and nodejs-0.10 app
Hot_deploy is not working for nodejs-0.6 and nodejs-0.10 app
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fotios Lindiakos
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-05 07:39 EDT by Yan Du
Modified: 2015-05-14 19:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:49:22 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 Yan Du 2013-09-05 07:39:42 EDT
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@nd10-111.dev.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@1.0.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@nd10-111.dev.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 11:29:50 EDT
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 06:43:44 EDT
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.