Bug 1025229 - make-ha event does not create new haproxy gear when setting minimum scaling value to 2
make-ha event does not create new haproxy gear when setting minimum scaling v...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
: UpcomingRelease
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-31 05:46 EDT by Johnny Liu
Modified: 2016-08-29 13:48 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:28:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Johnny Liu 2013-10-31 05:46:09 EDT
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 11:45:09 EDT
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 04:53:17 EDT
(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 15:25:35 EDT
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 04:39:11 EST
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 13:48:56 EDT
closing the NeedInfo.

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