Fedora Account System
Red Hat Associate
Red Hat Customer
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:
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/023dfc859ca71b6579b71a670c016a6220ac4175 Bug 1122657: Fixing logic to select gear for scaledown
Fixed with --> https://github.com/openshift/origin-server/pull/5653
Verified on devenv_5011 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. After step 2: There are 4 gears in the app, two of them has haproxy [root@ip-10-61-174-12 openshift]# tree -L 2 . |-- 314349817564537529827328 | |-- app-deployments | |-- app-root | |-- git | `-- php |-- 314349817564537529827328-jhou -> 314349817564537529827328 |-- 372976169470936775393280 | |-- app-deployments | |-- app-root | |-- gear-registry | |-- git | |-- haproxy | `-- php |-- 372976169470936775393280-jhou -> 372976169470936775393280 |-- 40b2ffe6162511e49d9576524b0cfa95 | |-- app-deployments | |-- app-root | |-- git | `-- php |-- 40b2ffe6162511e49d9576524b0cfa95-jhou -> 40b2ffe6162511e49d9576524b0cfa95 |-- 53d5f58dbe8b57ae56000060 | |-- app-deployments | |-- app-root | |-- gear-registry | |-- git | |-- haproxy | `-- php |-- last_access.log `-- php1s-jhou -> 53d5f58dbe8b57ae56000060 After step 3: The app scaled down, one gear without haproxy is removed [root@ip-10-61-174-12 openshift]# tree -L 2 . |-- 372976169470936775393280 | |-- app-deployments | |-- app-root | |-- gear-registry | |-- git | |-- haproxy | `-- php |-- 372976169470936775393280-jhou -> 372976169470936775393280 |-- 40b2ffe6162511e49d9576524b0cfa95 | |-- app-deployments | |-- app-root | |-- git | `-- php |-- 40b2ffe6162511e49d9576524b0cfa95-jhou -> 40b2ffe6162511e49d9576524b0cfa95 |-- 53d5f58dbe8b57ae56000060 | |-- app-deployments | |-- app-root | |-- gear-registry | |-- git | |-- haproxy | `-- php |-- last_access.log `-- php1s-jhou -> 53d5f58dbe8b57ae56000060