Bug 1122935 - Scale-down picks up incorrect gear in HA apps
Summary: Scale-down picks up incorrect gear in HA apps
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Brenton Leanhardt
QA Contact: libra bugs
URL:
Whiteboard:
Keywords: Upstream
Depends On: 1122657
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-24 12:47 UTC by Brenton Leanhardt
Modified: 2014-08-26 13:52 UTC (History)
10 users (show)

(edit)
If a scalable application was made highly available and scaled just to the point to which a second HAProxy gear was created, a scale down event could delete the HAProxy gear. This was due to a bug in the broker's controller library. This bug fix updates the controller logic and the HAProxy gear is now correctly preserved in this scenario.
Clone Of: 1122657
(edit)
Last Closed: 2014-08-26 13:52:54 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1095 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.5 bug fix and enhancement update 2014-08-26 17:51:34 UTC

Description Brenton Leanhardt 2014-07-24 12:47:28 UTC
+++ This bug was initially created as a clone of Bug #1122657 +++

Description of problem:
Scaling down an app which is HA picks up the wrong gear if HA was enabled when app had more than two gears.

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


How reproducible:
Always

Steps to Reproduce:
1. Create a scalable app and scale up to 3 gears
2. Make the app HA by issuing the REST API. Scale-up once more to have the 4th gear have haproxy in it.
3. Scale-down.

Actual results:
The gear brought down by scale-down event contained haproxy in it, thus rendering the app non-ha.

Expected results:
The gear selection for scale-down should account for HA/sparse-cart-multiplier/sparse-cart-min, so that an HA app is never reduced to being non-HA.

Additional info:

Comment 1 Brenton Leanhardt 2014-08-01 13:13:46 UTC
Upstream commit:

commit 023dfc859ca71b6579b71a670c016a6220ac4175
Author: Abhishek Gupta <abhgupta@redhat.com>
Date:   Wed Jul 23 17:04:18 2014 -0700

    Bug 1122657: Fixing logic to select gear for scaledown

Comment 4 Ma xiaoqiang 2014-08-04 06:01:51 UTC
Check on puddle[2.1.5/2014-08-01.1]

1.configure the env 
#oo-admin-ctl-user -l test  --allowha true
#sed -i 's/ALLOW_HA_APPLICATIONS="false"/ALLOW_HA_APPLICATIONS="true"/' /etc/openshift/broker.conf 
#/etc/init.d/openshift-broker restart
2.create a scalable app
#rhc app create phps php-5.4 -s
3.Scale up the app twice:
curl -s -k -H 'Content-Type: Application/json' --user $user:$password https://$broker/broker/rest/domains/$domain/applications/php1s/events -X POST -d '{"event":"scale-up"}'
4. Make the app HA
curl -s -k -H 'Content-Type: Application/json' --user $user:$password  https://$broker/broker/rest/domains/$domain/applications/php1s/events -X POST -d '{"event":"make-ha"}'
5. Scale up one more time
curl -s -k -H 'Content-Type: Application/json' --user $user:$password https://$broker/broker/rest/domains/$domain/applications/php1s/events -X POST -d '{"event":"scale-up"}'
The app contains two ha-proxy cartridges 
6.Scale down the app
rhc app scale-down phps 
7.check the haproxy cartridge 
#rhc app-ssh phps --gears "ls -l"
The app still contains two haproxy cartridges. so move the issue to VERIFIED.

Comment 6 errata-xmlrpc 2014-08-26 13:52:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1095.html


Note You need to log in before you can comment on or make changes to this bug.