Bug 994922 - Print misleading messages the first time pushing hot_deploy marker to a Node.js app
Print misleading messages the first time pushing hot_deploy marker to a Node....
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Hiro Asari
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-08 05:13 EDT by Zhe Wang
Modified: 2015-05-14 19:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:49:58 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-08-08 05:13:01 EDT
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@1.1.37
remote: npm info using node@v0.6.20
remote: npm info preinstall OpenShift-Sample-App@1.0.0
remote: npm info build /var/lib/openshift/627c4dacfffc11e287d022000aa416e1/app-root/runtime/repo
remote: npm info linkStuff OpenShift-Sample-App@1.0.0
remote: npm info install OpenShift-Sample-App@1.0.0
remote: npm info postinstall OpenShift-Sample-App@1.0.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 14:25:40 EDT
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 02:51:21 EDT
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@njs-dev3647tst.dev.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.