Bug 1025229 - make-ha event does not create new haproxy gear when setting minimum scaling value to 2
Summary: make-ha event does not create new haproxy gear when setting minimum scaling v...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-31 09:46 UTC by Johnny Liu
Modified: 2016-08-29 17:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:28:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2013-10-31 09:46:09 UTC
Description of problem:
Set minimum scaling value to 2, then sent make-ha" event using rest api, no new haproxy gear is created, this sclable app does NOT become Highly Available.


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

How reproducible:
Always

Steps to Reproduce:
1. Set ALLOW_HA_APPLICATIONS="true" in broker config file, and enable High Availability capability to the user using oo-admin-ctl-user
2. Create a scalable app
3. Set minimum scaling value to 2, now app will have 2 gears, one is haproxy gear, anther one is web gear.
$ rhc cartridge-scale php-5.3 -a scaphp53app --min 2
4. Sent a "make-ha" event using rest api

Actual results:
No new haproxy gear is created. This app still has 2 gears, one is haproxy gear, another one is web gear.

Expected results:
A new haproxy gear should be created.


Additional info:
If skip step 3 in the above steps, "make-ha" event will create a new haproxy gear to make this app to become Highly Available.

Comment 1 Rajat Chopra 2013-10-31 15:45:09 UTC
It is expected behaviour. What is missing is the right messaging.
We do not configure haproxy on existing gears. What we do is set the application up for HA. In this case a scale-up and scale-down will be needed to make haproxy appear on two gears. 

In the case where min==1 on web component, we just issue a scale-up anyway. 

It is debatable why the platform itself can't scale-up or down. The reason we did not do it is because in some cases it could be several scale-ups/downs required. e.g. if the multiplier was set to 3 and then it is changed to 4. This would require several scale-down/ups to reach the optimum ratio.

The right messaging should be either of the two, depending on what we really did:
 - 'We have enabled HA on your application, it will need atleast one scale-up for HA to be effective.' or, 
 - 'We have enabled HA on your application, and also performed a scale-up for it to be effective'

Comment 2 Johnny Liu 2013-11-01 08:53:17 UTC
(In reply to Rajat Chopra from comment #1)
> It is expected behaviour. What is missing is the right messaging.
> We do not configure haproxy on existing gears. What we do is set the
> application up for HA. In this case a scale-up and scale-down will be needed
> to make haproxy appear on two gears. 
> 
> In the case where min==1 on web component, we just issue a scale-up anyway. 
> 
> It is debatable why the platform itself can't scale-up or down. The reason
> we did not do it is because in some cases it could be several
> scale-ups/downs required. e.g. if the multiplier was set to 3 and then it is
> changed to 4. This would require several scale-down/ups to reach the optimum
> ratio.
> 
> The right messaging should be either of the two, depending on what we really
> did:
>  - 'We have enabled HA on your application, it will need atleast one
> scale-up for HA to be effective.' or, 
>  - 'We have enabled HA on your application, and also performed a scale-up
> for it to be effective'

Thanks for your clarification. Indeed when min==2, do scale-up one time, new gear will be created, and it is a haproxy gear, then my application become HA.

I have a question about multiplier, I set multiplier to 2 using oo-admin-ctl-app.
# oo-admin-ctl-app -c set-multiplier --multiplier 2 -a scaphp53app -l jialiu --cartridge haproxy-1.4

Then scale-up for several times, but my application only has 2 haproxy gears, looks like multiplier does not take any effect. Am I missing some thing?

Comment 3 Rajat Chopra 2013-11-01 19:25:35 UTC
You are right. And the reason is that haproxy still has the max value==1.
After the min is satisfied, the max value constraints it.

'make-ha' should ideally fix the max of the cartridge. Fix put in with https://github.com/openshift/origin-server/pull/4070

Comment 4 Jianwei Hou 2013-11-04 09:39:11 UTC
The problem discussed in comment 2 and 3 has been verified on devenv_3984. Regarding the messaging discussed in comment 1, will there be any updates(fixes)? The message now is all the same when enabling ha to a scalable app that has 1 or 2 gears

Comment 5 Rajat Chopra 2016-08-29 17:48:56 UTC
closing the NeedInfo.


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