Red Hat Bugzilla – Bug 969325
Failed to move primary cartridge app due to httpd.pid file being empty
Last modified: 2015-05-14 20:17:25 EDT
Created attachment 755195 [details]
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):
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
[root@ip-10-144-65-218 openshift]# oo-admin-move --gear_uuid 821212345689567108530176 -i ip-10-144-65-218
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.
should be able to move the app successfully.
The root cause here is that these apps can't be stopped under these conditions.
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
Assigning to broker: broker should check the status of gear stop and call force_stop if stop failed.
Fixed in stage with pull request https://github.com/openshift/origin-server/pull/2719
Note that the corresponding fix is not in master yet.
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)