Bug 1023885

Summary: Failed to move app which is created from downloadable cartridge due to httpd.pid file is empty.
Product: OpenShift Online Reporter: Liang Xia <lxia>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers
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-10-28 14:17:30 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 Liang Xia 2013-10-28 08:42:29 UTC
Description of problem:
Failed to move app which is created from downloadable cartridge due to httpd.pid file is empty.

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

How reproducible:
always

Steps to Reproduce:
1.create an app from a downloadable cartridge.
#  rhc app create app2 https://raw.github.com/zhaozhanqi/phpv2/master/metadata/manifest.yml
2.move this app.
3.on node, truncate httpd.pid file for this app.
4.move this app.

Actual results:
Step 2, move successfully.
Step 4,
# oo-admin-move --gear_uuid 526e18c760aeeaccd1000001 -i ip-10-239-15-81
URL: http://app2-lxia.dev.rhcloud.com
Login: lxia
App UUID: 526e18c760aeeaccd1000001
Gear UUID: 526e18c760aeeaccd1000001
DEBUG: Source district uuid: 3f5e62d03f7911e3aa0122000a49841d
DEBUG: Destination district uuid: 3f5e62d03f7911e3aa0122000a49841d
DEBUG: Getting existing app 'app2' status before moving
DEBUG: Gear component 'zhaozhanqi-php-5.3' was running
DEBUG: Stopping existing app cartridge 'zhaozhanqi-php-5.3' before moving
DEBUG: Error performing stop on existing app on try 1: Node execution failure (invalid exit code from node).
DEBUG: Error performing stop on existing app on try 2: Node execution failure (invalid exit code from node).
DEBUG: Force stopping existing app cartridge 'zhaozhanqi-php-5.3' before moving
DEBUG: Creating new account for gear 'app2' on ip-10-239-15-81
DEBUG: Moving content for app 'app2', gear 'app2' to ip-10-239-15-81
Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa)
Agent pid 19888
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 19888 killed;
DEBUG: Moving system components for app 'app2', gear 'app2' to ip-10-239-15-81
Identity added: /var/www/openshift/broker/config/keys/rsync_id_rsa (/var/www/openshift/broker/config/keys/rsync_id_rsa)
Agent pid 19951
unset SSH_AUTH_SOCK;
unset SSH_AGENT_PID;
echo Agent pid 19951 killed;
DEBUG: Starting cartridge 'zhaozhanqi-php-5.3' in 'app2' after move on ip-10-239-15-81
DEBUG: Moving failed.  Rolling back gear 'app2' in 'app2' with delete on 'ip-10-239-15-81'
Node execution failure (invalid exit code from node).

Expected results:
App should be moved successfully when cartridge's httpd.pid file is empty.

Additional info:
Move app with empty httpd.pid file can success if not using download cartridge.

Comment 1 Dan McPherson 2013-10-28 14:17:30 UTC
This doesn't sound like a bug.  The protocol for moving an app that won't start (because of a cartridge bug which it sounds like this is), is to first stop or idle the app, then move it.  Then attempt to start it back up (just to leave the stop_lock in the correct state).  Please reopen if I have misunderstood what you believe the nature of the problem is.