Bug 1170040

Summary: unidle scaled application took too long time
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: ContainersAssignee: Timothy Williams <tiwillia>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2.0CC: jokerman, libra-onpremise-devel, mmccomas, tiwillia
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: 2015-09-23 21:15:53 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
platform.log about unidle process none

Description Anping Li 2014-12-03 05:48:23 UTC
Description of problem:
For scaled application, if both head gear and scaled gears are in idle. the gear can be unidled whatever by accessing app's url or runing "oo-admin-ctl-gears unidlegear", but the time is too long ( about 4 mins), an error message  also be reported in platform.log

Version-Release number of selected component (if applicable):
OSE 2.2-2014-12-02.3/

How reproducible:
always

Steps to Reproduce:
1. create scaled applications .
2. idle all gears
3. access this application (curl http://appdns/) or run "oo-admin-ctl-gears unidlegear <app_uuid>",
4. check platform.log on node1(where head gear located.)

Actual results:
Step 4: it took about 4 minutes to unidle this application.

# time oo-admin-ctl-gears unidlegear domain-nonscalingapp-1
Unidling gear domain-nonscalingapp-1 ... [  OK ]
real    0m2.270s
user    0m0.716s
sys    0m0.150s

# time oo-admin-ctl-gears unidlegear domain-scalingapp-1
Unidling gear domain-scalingapp-1 ... [  OK ]
real    3m56.725s
user    0m0.822s
sys    0m0.163s

Step 5: there is error as below:
December 03 12:51:51 ERROR Failed to start application 547f674de5fed5b28b000038 during unidle: {"api_version":1.6,"data":null,"messages":[{"exit_code":-1,"field":null,"index":null,"severity":"debug","text":"Shell command '/sbin/runuser -s /bin/sh 547f674de5fed5b28b000038 -c \"exec /usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c3,c479' /bin/sh -c \\\"set -e; /var/lib/openshift/547f674de5fed5b28b000038/haproxy/bin/control start \\\"\"' exceeded timeout of 234"},{"exit_code":-1,"field":null,"index":null,"severity":"error","text":"A gear start did not complete on 1 gear. Please try again and contact support if the issue persists."}],"status":"internal_server_error","supported_api_versions":[1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7],"type":null,"version":"1.6"}

Expected results:
1) it should takes little time to unidle gears
2) no error was show during unidle gear

Comment 1 Anping Li 2014-12-03 05:50:20 UTC
Created attachment 963981 [details]
platform.log about unidle process

Comment 3 Timothy Williams 2015-09-23 21:15:53 UTC
This should be resolved with https://github.com/tiwillia/origin-server/commit/db40eb48932eb832551c2b6bbe4c7d6a7ba30534

This is a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1257757

*** This bug has been marked as a duplicate of bug 1257757 ***