Bug 853372

Summary: Failed to move primary cartridge app due to httpd.pid file being empty
Product: OKD Reporter: Jianwei Hou <jhou>
Component: ContainersAssignee: Ram Ranganathan <ramr>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: mfisher, mpatel
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: 2012-09-17 21:29:58 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 Jianwei Hou 2012-08-31 09:31:39 UTC
Description of problem:
Moving an application failed when /var/lib/stickshift/$UUID/$CARTRIDGE/run/httpd.pid is empty

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

How reproducible:
Always

Steps to Reproduce:
1. Setup multi-node environment
2. Create an application(apache based apps: php/python/perl/ruby etc)
   rhc app create -a php1 -t php-5.3
3. on node, set /var/lib/$UUID/php-5.3/run/httpd.pid empty
   :>/var/lib/$UUID/php-5.3/run/httpd.pid
3. Move this app 
   rhc-admin-move --gear_uuid $UUID
  
Actual results:
Move failed

Expected results:
The cartridges would be able to detect this and continue moving the application.

Additional info:

Comment 1 Ram Ranganathan 2012-09-05 02:32:22 UTC
Fixed with pull requests: 
https://github.com/openshift/crankcase/pull/452
https://github.com/openshift/li/pull/342

waiting for merge+test.

Fix affects only apache based server (php/python/ruby/perl).

Comment 2 Jianwei Hou 2012-09-05 09:10:25 UTC
Verified on devenv_2115

Steps:
1. Setup multi-node environment
2. Create php/python/perl/ruby-1.8/ruby-1.9 applications
3. On node, set httpd.pid file empty
   :> /var/lib/$UUID/$cartridge/run/httpd.pid
4. move this app
   rhc-admin-move --gear_uuid $UUID -i $target_server_identity

Result:
All apps are move successfully when httpd.pid is empty.