Bug 994922 - Print misleading messages the first time pushing hot_deploy marker to a Node.js app
Summary: Print misleading messages the first time pushing hot_deploy marker to a Node....
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: Hiro Asari
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-08 09:13 UTC by Zhe Wang
Modified: 2015-05-14 23:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-29 12:49:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Zhe Wang 2013-08-08 09:13:01 UTC
Description of problem:
For a Node.js app, although it is by design that hot deployment won't take effect until another deployment after supervisor process is started (that is to say, the node process will be restarted when we push hot_deploy marker to the app's repo), it still prints "remote: Not stopping cartridge nodejs because hot deploy is enabled" the first time we push hot_deploy marker while the node process is actually restarted.

It would be more user friendly if we could keep users informed of this design.

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

How reproducible:
always

Steps to Reproduce:
1. create a node.js application
2. SSH into this app, and record the pid in its nodejs/run/node.pid
3. create a hot deploy marker
4. push the marker to the app's repo
5. check the pid file again to see if the pid changes

Actual results:
When pushing the hot_deploy marker, the node.js app was actually restarted (node.pid changed), but the messages printed in console were misleading:

remote: Not stopping cartridge nodejs because hot deploy is enabled
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
remote: Saving away previously installed Node modules
remote: npm info it worked if it ends with ok
remote: npm info using npm.37
remote: npm info using node.20
remote: npm info preinstall OpenShift-Sample-App.0
remote: npm info build /var/lib/openshift/627c4dacfffc11e287d022000aa416e1/app-root/runtime/repo
remote: npm info linkStuff OpenShift-Sample-App.0
remote: npm info install OpenShift-Sample-App.0
remote: npm info postinstall OpenShift-Sample-App.0
remote: npm info ok 
remote: Starting application njs
remote: Not starting cartridge nodejs because hot deploy is enabled
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expected results:
Notify Node.js users with correct information the first time pushing hot_deploy marker.

Additional info:

Comment 2 openshift-github-bot 2013-08-13 18:25:40 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/8880122cc74f2ed9794460863e5dd53bde530165
Bug 994922

Warn user of supervisor control when we detect 'hot_deploy' marker.

When the hot_deploy marker is present, stop nor start is invoked, so
we need to check the presence of the marker in a different way.

Notice that the first time we push 'hot_deploy' marker, the stop cycle
will not warn that it detected the marker (because it doesn't exist on
the gear).

Comment 3 Zhe Wang 2013-08-14 06:51:21 UTC
Verified in devenv_3647:

Upon the first time we push 'hot_deploy' marker, it prompts:

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.
To ssh://e65412cc04ac11e3953622000aa42b7a.rhcloud.com/~/git/njs.git/
   037cb0d..835966d  master -> master

which is desirable.

Thanks,
Zhe Wang


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