Bug 1116817 - multiple nodejs processes running in a gear
Summary: multiple nodejs processes running in a gear
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 1077353
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-07 11:28 UTC by Brenton Leanhardt
Modified: 2014-08-04 13:27 UTC (History)
14 users (show)

Fixed In Version: openshift-origin-cartridge-nodejs-1.24.3.5-1.el6op
Doc Type: Bug Fix
Doc Text:
Under certain race conditions or user actions, it was possible for multiple Node.js supervisor processes to be running for a Node.js cartridge. Because only one process could bind to the port, others would die, resulting in the supervisor continuously retrying to start them and consuming all of the gear's CPU. In addition to now checking whether a pidfile exists for another Node.js instance in the gear, this bug fix updates the start up logic to also check whether another supervisor or child is running before starting another. As a result, accidental second invocations of the supervisor starting now correctly exit. The oo-admin-upgrade command is required to upgrade existing gears after applying this fix. See the Solution section in the errata advisory for full details.
Clone Of: 1077353
Environment:
Last Closed: 2014-08-04 13:27:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0999 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.4 bug fix and enhancement update 2014-08-04 17:26:43 UTC

Comment 4 Anping Li 2014-07-15 04:28:52 UTC
erified and pass on puddle-2-1-2014-07-14. 
After restart gears, only there is only one nodejs process.

[njs-hanli1dom.example.com run]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
3861      4795  4784  0 00:24 ?        00:00:00 sshd: 53c4a0bd6892df587f000005@pts/1
3861      4796  4795  0 00:24 pts/1    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
3861      5040  4796  0 00:24 pts/1    00:00:00 ps -ef
3861     11122     1  0 Jul14 ?        00:00:00 node /opt/rh/nodejs010/root/usr/bin/supervisor -e
3861     11123     1  0 Jul14 ?        00:00:00 /usr/bin/logshifter -tag nodejs
3861     11168 11122  0 Jul14 ?        00:00:00 node server.js
[njs-hanli1dom.example.com run]\> rm cartridge.pid 
[njs-hanli1dom.example.com run]\> gear restart
Cart to restart?
1. nodejs-0.10
?  1
Stopping NodeJS cartridge
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Stopping application 'njs' ...
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Stopped Node application 'njs'
Starting NodeJS cartridge
Tue Jul 15 2014 00:24:35 GMT-0400 (EDT): Starting application 'njs' ...
[njs-hanli1dom.example.com run]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
3861      4795  4784  0 00:24 ?        00:00:00 sshd: 53c4a0bd6892df587f000005@pts/1
3861      4796  4795  0 00:24 pts/1    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
3861      5361     1  1 00:24 pts/1    00:00:00 node /opt/rh/nodejs010/root/usr/bin/supervisor -e
3861      5362     1  0 00:24 pts/1    00:00:00 /usr/bin/logshifter -tag nodejs
3861      5404  5361  3 00:24 pts/1    00:00:00 node server.js
3861      5420  4796  0 00:24 pts/1    00:00:00 ps -ef

Comment 6 errata-xmlrpc 2014-08-04 13:27:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-0999.html


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