Bug 1017617

Summary: [deploy]disable_auto_scaling marker does not work for scaling apps scaled up via REST API
Product: OpenShift Online Reporter: Zhe Wang <zhewang>
Component: ContainersAssignee: Mrunal Patel <mpatel>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jhonce, xtian
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: 2014-01-24 03:23:45 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:

Description Zhe Wang 2013-10-10 08:59:17 UTC
Description of problem:
Given a scaling app with a disable_auto_scaling marker added, the app will automatically scale down after scaling up via REST API. Currently, the following cartridges are covered:

python-2.7
python-3.3

will append the list in comments if find others.

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

How reproducible:
always

Steps to Reproduce:
1. create a scaling app
2. create a disable_auto_scaling marker
3. push the marker to its remote repo
4. scale up the app via REST API
5. check the scaled-up gear and the haproxy-status page
6. wait for sometime (in my test, it was around 10 mins)
7. repeat step 5
8. check the scale_events.log
9. check if the disable_auto_scaling marker is at presence

Actual results:
In Step 5, the app was scaled up successfully, and the scaled-up gear was accessible. However, in Step 7, only the local gear was shown in the haproxy-status page, and it returned error 503 when accessing the scaled-up gear. Moreover, in the scale_events.log, the sscaled-up gear was scaled-down:

I, [2013-10-10T04:36:54.139800 #14505]  INFO -- : GEAR_DOWN - capacity: 0.0% gear_count: 2 sessions: 0 remove_thresh: 40.5%

but the disable_auto_scaling marker was in the app's repo

Expected results:
The scaled app should not be scaled down with the disable_auto_scaling marker at presence.

Additional info:

Comment 1 Mrunal Patel 2013-10-21 18:00:47 UTC
We now require that haproxy be restarted to pick up the disable_auto_scaling marker since haproxy isn't restarted automatically on a git push anymore.

Comment 2 Zhe Wang 2013-10-22 08:21:16 UTC
After restarting the ha cart, the auto_scaling was indeed disabled. Move this bug to VERIFIED.