Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1051190 - Provide ability to customize haproxy auto scaling algorithm
Provide ability to customize haproxy auto scaling algorithm
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE (Show other bugs)
2.0.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
:
Depends On: 1057558
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-09 15:10 EST by John Keck
Modified: 2017-03-08 12 EST (History)
7 users (show)

See Also:
Fixed In Version: openshift-origin-cartridge-haproxy-1.17.3.5-1.el6op
Doc Type: Enhancement
Doc Text:
Users can now create a new action hook that makes automatic scaling decisions for a specific application using a customized haproxy_ctld.rb script. See the OpenShift Enterprise User Guide for more information.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-02-25 10:42:55 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0209 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.0.3 bugfix and enhancement update 2014-02-25 15:40:32 EST

  None (edit)
Description John Keck 2014-01-09 15:10:16 EST
Description of problem:

Provide support for customizing the haproxy auto scaling algorithm.  The following pull request needs to be merged into Enterprise 2.

https://github.com/openshift/origin-server/pull/4323
Comment 2 Brenton Leanhardt 2014-01-24 13:28:24 EST
Upstream commits:

commit 73b90a9488dac9c82e9ae8d4132e5d94d59a69c9
Author: Mike McGrath <mmcgrath@redhat.com>
Date:   Wed Dec 11 17:00:41 2013 -0600

    checking for executible bits prior to execution

commit 1e78a3bf067dc81e993639ea47a46887136eeb37
Author: Mike McGrath <mmcgrath@redhat.com>
Date:   Wed Dec 11 16:52:24 2013 -0600

    updated typos as per pull request

commit 1d5bbced6cd14a279b4e6b19921e416d4b29e142
Author: Mike McGrath <mmcgrath@redhat.com>
Date:   Wed Dec 11 14:59:51 2013 -0600

    allow for customized haproxy_ctld.rb file to exist

commit e5fb1073aa8425a6a213afd941d3fd08605f4672
Author: Mike McGrath <mmcgrath@redhat.com>
Date:   Wed Dec 11 14:24:48 2013 -0600

    added haproxy_ctld comments and ability to run custom haproxy_ctld
Comment 4 Brenton Leanhardt 2014-01-24 14:17:59 EST
I'm CC'ing Alex so docs can think about what they would like to do for this new feature.  It's pretty simple to use.  Check in your own implementation to /.openshift/action_hooks/haproxy_ctld.rb and make sure it's executable.
Comment 8 Gaoyun Pei 2014-01-28 02:53:26 EST
Test this feature with openshift-origin-cartridge-haproxy-1.17.3.4-1.el6op.

Found the customized haproxy_ctld.rb action-hook will not take effect till the haproxy cartridge get restart. BZ#1057558 told more detail about this.
Comment 11 Nan Wei 2014-02-11 02:10:11 EST
openshift enterprise: 2014-02-10.2

1. Create scalable app
2. Add haproxy_ctld.rb to .openshift/action_hooks/ with x permission
3. Git push the change
remote: Deployment id is cb47259f
remote: Activating deployment
remote: HAProxy already running
remote: Action hook haproxy_ctld.rb detected
remote: Action hook haproxy_ctld.rb restarted
remote: HAProxy instance is started
Comment 12 Nan Wei 2014-02-11 02:38:39 EST
openshift enterprise: 2014-02-10.2

1. Create scalable app
2. Add customize haproxy_ctld.rb to .openshift/action_hooks/ with x permission
FLAP_PROTECTION_TIME_SECONDS = 200
gear_up_pct = 30.0
3. Git push the change
remote: Deployment id is cb47259f
remote: Activating deployment
remote: HAProxy already running
remote: Action hook haproxy_ctld.rb detected
remote: Action hook haproxy_ctld.rb restarted
remote: HAProxy instance is started
4. check scale_events.log
tailf /var/lib/openshift/$uuid/haproxy/logs/scale_events.log
D, [2014-02-11T02:22:32.084319 #8945] DEBUG -- : GEAR_INFO - capacity: 6.25% gear_count: 1 sessions: 1 up/remove_thresh: 30.0%/1.0% sec_left_til_remove: 140 gear_remove_thresh: 0/20
D, [2014-02-11T02:22:37.690486 #8945] DEBUG -- : Local sessions 7
D, [2014-02-11T02:22:37.734693 #8945] DEBUG -- : Got stats from 0 remote proxies.
I, [2014-02-11T02:22:37.785819 #8945]  INFO -- : add-gear - capacity: 43.75% gear_count: 1 sessions: 7 up_thresh: 30.0%

After 200 seconds: 
D, [2014-02-11T02:27:46.808533 #8945] DEBUG -- : Got stats from 0 remote proxies.
D, [2014-02-11T02:27:46.808642 #8945] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 30.0%/1.0% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2014-02-11T02:27:51.809914 #8945] DEBUG -- : Local sessions 0
D, [2014-02-11T02:27:51.812755 #8945] DEBUG -- : Got stats from 0 remote proxies.
Comment 14 errata-xmlrpc 2014-02-25 10:42:55 EST
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-0209.html

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