Bug 969325

Summary: Failed to move primary cartridge app due to httpd.pid file being empty
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: PodAssignee: Rajat Chopra <rchopra>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, jhonce, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 04:14:48 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:
Attachments:
Description Flags
development.log none

Description zhaozhanqi 2013-05-31 08:12:37 UTC
Created attachment 755195 [details]
development.log

Description of problem:

Moving an application failed when the folder /var/lib/openshift/$uuid/$cartriage/run/http.pid is empty

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

How reproducible:
always

Steps to Reproduce:
1. set up multi-node env
2. create an application (ruby,perl,php,python)
3. set the http.pid file empty
4. move this app

Actual results:

[root@ip-10-144-65-218 openshift]# oo-admin-move --gear_uuid 821212345689567108530176 -i ip-10-144-65-218
URL: http://zqruby18-zqd.dev.rhcloud.com
Login: zzhao
App UUID: 51a81c279f5742a28f0002a5
Gear UUID: 51a81c279f5742a28f0002a5
DEBUG: Source district uuid: 51a8119d9f57421449000001
DEBUG: Destination district uuid: 51a8119d9f57421449000001
DEBUG: Getting existing app 'zqruby18' status before moving
DEBUG: Gear component 'ruby-1.8' was running
DEBUG: Stopping existing app cartridge 'ruby-1.8' before moving
DEBUG: Error performing stop on existing app on try 1: Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support.
DEBUG: Error performing stop on existing app on try 2: Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support.
Node execution failure (invalid exit code from node).  If the problem persists please contact Red Hat support.


Expected results:

should be able to move the app successfully.

Additional info:

Comment 1 Paul Morie 2013-05-31 15:00:31 UTC
The root cause here is that these apps can't be stopped under these conditions.

Comment 2 Paul Morie 2013-05-31 15:51:40 UTC
Looks like there are a few different methodologies used to stop these cartridges:

1. Ruby   - custom code in control script
2. Php    - apache stop
3. Python - httpd stop
4. Perl   - httpd stop

Comment 3 Paul Morie 2013-05-31 18:26:11 UTC
Assigning to broker: broker should check the status of gear stop and call force_stop if stop failed.

Comment 4 Dan McPherson 2013-05-31 23:39:47 UTC
https://github.com/openshift/origin-server/pull/2722

Comment 5 Rajat Chopra 2013-06-01 00:09:01 UTC
Fixed in stage with pull request https://github.com/openshift/origin-server/pull/2719

Note that the corresponding fix is not in master yet.

Comment 6 zhaozhanqi 2013-06-03 03:22:48 UTC
Tested this bug on devenv_stg_356, it has been fixed.

 include cartridge( php,phpadmin,perl,python-2.6,ruby-1.8,ruby-1.9)