Bug 1122657 - Scale-down picks up incorrect gear in HA apps
Summary: Scale-down picks up incorrect gear in HA apps
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 1122935
TreeView+ depends on / blocked
 
Reported: 2014-07-23 17:24 UTC by Rajat Chopra
Modified: 2015-05-15 00:29 UTC (History)
5 users (show)

(edit)
Clone Of:
: 1122935 (view as bug list)
(edit)
Last Closed: 2014-10-10 00:49:31 UTC


Attachments (Terms of Use)

Description Rajat Chopra 2014-07-23 17:24:41 UTC
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 openshift-github-bot 2014-07-25 18:50:33 UTC
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

Comment 2 Abhishek Gupta 2014-07-25 19:10:45 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/5653

Comment 3 Jianwei Hou 2014-07-28 03:13:54 UTC
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


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