+++ 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:
Upstream commit: commit 023dfc859ca71b6579b71a670c016a6220ac4175 Author: Abhishek Gupta <abhgupta> Date: Wed Jul 23 17:04:18 2014 -0700 Bug 1122657: Fixing logic to select gear for scaledown
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.
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