Bug 1024022

Summary: creating node.js 0.10 application with --from-code starts two instances of the application running supervisor
Product: OpenShift Online Reporter: Corey Daley <cdaley>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: yadu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:27:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Daley 2013-10-28 15:15:35 UTC
Description of problem:
Creating an application with --from-code starts two instances of the application with supervisor, resulting in the error logs filling with bind errors since the second application can not bind to port 8080

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


How reproducible:
100%

Steps to Reproduce:
1. Create node.js 0.10 application from command line using --from-code
2. use rhc tail $appname to watch errors come across
3.ssh into application and you can see two supervisor applications running
4. restart the application and it will be fixed

Actual results:
Two processes with supervisor running your node application are started, creating errors in the log about binding to port 8080

Expected results:
The application should run only once.

Additional info:
rhc app create ghost nodejs-0.10 --env NODE_ENV=production --from-code https://github.com/developercorey/openshift-ghost-quickstart.git

rhc app create ghost nodejs-0.10 --from-code https://github.com/developercorey/openshift-nodejs-websocket-example.git

Comment 1 openshift-github-bot 2013-10-29 01:15:25 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/1ebbb1f326bfae61d376ebe483e9b6a2a836734c
Bug 1024022 - cartridge allows two starts of supervisor

* Follow other cartridges and starting a started cartridge is a NO-OP

Comment 2 Yan Du 2013-10-29 06:39:02 UTC
test on devenv_3959

steps:
1. rhc app create ghost1 nodejs-0.10 --env NODE_ENV=production --from-code https://github.com/developercorey/openshift-ghost-quickstart.git
2. rhc tail $app to check the log
2. ssh into app and check the supervisor process

only one supervisor process running for the app.
[ghost1-dyy.dev.rhcloud.com 526f56fb9778af895900003f]\> ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
1002     19409     1  3 02:35 ?        00:00:06 node /opt/rh/nodejs010/root/usr/bin/supervisor -e node|js|coffee -p 1000 -- index.js
1002     19431 19409  0 02:35 ?        00:00:01 node index.js
1002     20563 20447  0 02:38 ?        00:00:00 sshd: 526f56fb9778af895900003f@pts/2
1002     20594 20563  3 02:38 pts/2    00:00:00 /bin/bash --init-file /usr/bin/rhcsh -i
1002     21060 20594  0 02:38 pts/2    00:00:00 ps -ef


move to verified.