Bug 1006355

Summary: supervisor.pid is empty for nodejs apps with hot_deploy
Product: OpenShift Online Reporter: Oleg Fayans <ofayans>
Component: ContainersAssignee: Fotios Lindiakos <fotios>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: amarecek, jkeck, xtian, 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: 2013-09-19 16:50:36 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 Oleg Fayans 2013-09-10 13:40:13 UTC
Description of problem:

nodejs/run/supervisor.pid file is empty after I added hot_deploy marker and stays empty no matter how many subsequent git pushes I do

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

How reproducible:
Always
Steps to Reproduce:
1. Create a nodejs-0.6 app
2. add hot_deploy marker, make some changes, do git push
3. ssh to the app 
4. do "cat nodejs/run/supervisor.pid"

Actual results:
the file is empty

Expected results:
the file should contain the PID

Additional info:

Comment 1 Oleg Fayans 2013-09-11 08:43:44 UTC
Still reproduced on devenv_3772

I have one more question.
When I do 
ps -ef | grep super
in the gear, I am getting 2 superviser pids:
1001     25780     1  0 04:32 ?        00:00:00 node /var/lib/openshift/52302a713563b82a6c000011//.node_modules/.bin/supervisor -e node|js|coffee -- server.js
1001     26949     1  1 04:34 ?        00:00:04 node /var/lib/openshift/52302a713563b82a6c000011//.node_modules/.bin/supervisor -e node|js|coffee -- server.js

Which one of them should get into the pid file. And why there are two of them?

Comment 2 Fotios Lindiakos 2013-09-11 15:27:09 UTC
(In reply to ofayans from comment #1)
> Still reproduced on devenv_3772
> 
> I have one more question.
> When I do 
> ps -ef | grep super
> in the gear, I am getting 2 superviser pids:
> 1001     25780     1  0 04:32 ?        00:00:00 node
> /var/lib/openshift/52302a713563b82a6c000011//.node_modules/.bin/supervisor
> -e node|js|coffee -- server.js
> 1001     26949     1  1 04:34 ?        00:00:04 node
> /var/lib/openshift/52302a713563b82a6c000011//.node_modules/.bin/supervisor
> -e node|js|coffee -- server.js
> 
> Which one of them should get into the pid file. And why there are two of
> them?

If you run ps with `--forest` it will show that one of those supervisors is a child of the other. The main parent should be the one in the pid file.

Comment 3 Fotios Lindiakos 2013-09-11 15:58:57 UTC
This was caused by the args output of `ps` including double slashes when not using SCL. This has been fixed in this PR, currently testing and merging.

https://github.com/openshift/origin-server/pull/3619

Comment 4 Yan Du 2013-09-12 05:41:36 UTC
test on devenv_3776

steps:

1. Create a nodejs-0.6 app
2. add hot_deploy marker, make some changes, do git push
3. ssh to the app 
4. check supervisor.pid the after push:
[n6-111.dev.rhcloud.com 5231504f6849bb75310000c3]\> cat nodejs/run/supervisor.pid
29455

move the bug to verified.