no autoscaling action occurs for percentage adjustment, depending on initial size & adjustment step size

Bug #1251007 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Eoghan Glynn
Havana
Fix Released
High
Eoghan Glynn

Bug Description

If the AdjustmentType is set to PercentChangeInCapacity, then depending on the choice of the instance group MinSize and the scale-up policy ScalingAdjustment, no autoscaling actions may occur even when the under-scaled alarm fires.

This situation occurs if (MinSize * ScalingAdjustment / 100.0) < 1.0, in which case the group never get gets scaled up even if the under-scaled alarm stays in the alarm state forever.

It sounds like an edge-case, but would probably be common enough in reality, e.g. MinSize = 3, ScalingAdjustment = 33% or MinSize = 4, ScalingAdjustment = 20% etc.

The problem is that AutoScaling.adjust() does not pay enough attention to rounding issues. It should instead follow the rounding rules used by AWS Autoscaling:

http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html

i.e. round the adjustment up if abs(adjustment) < 1.0, otherwise round down

Eoghan Glynn (eglynn)
Changed in heat:
status: New → In Progress
assignee: nobody → Eoghan Glynn (eglynn)
summary: - no autoscaling action occurs for AdjustmentType:
- PercentChangeInCapacity, depending on MinSize & ScalingAdjustment step
- size
+ no autoscaling action occurs for percentage adjustment, depending on
+ initial size & adjustment step size
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/56281

Eoghan Glynn (eglynn)
tags: added: havana-backport-potential
Steven Dake (sdake)
Changed in heat:
importance: Undecided → High
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/56281
Committed: http://github.com/openstack/heat/commit/5720e6d647ce3a273d638fd7dacc9c2d6eb2bc22
Submitter: Jenkins
Branch: master

commit 5720e6d647ce3a273d638fd7dacc9c2d6eb2bc22
Author: Eoghan Glynn <email address hidden>
Date: Wed Nov 13 17:47:09 2013 +0000

    Ensure autoscaling actions occur for percentage adjustment

    Fixes bug 1251007

    Previously if the AdjustmentType was set to PercentChangeInCapacity,
    then depending on the choice of the instance group MinSize and the
    scale-up policy ScalingAdjustment, no autoscaling actions may occur
    even when the under-scaled alarm fires.

    This situation occurred if:

       (MinSize * ScalingAdjustment / 100.0) < 1.0

    in which case the group never get gets scaled up even if the under-
    scaled alarm stays in the alarm state forever.

    Now we follow the rounding rules used by AWS Autoscaling:

      http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html

    Change-Id: I79e5e743de1944ace5ef2c4dbcb76c9cab7262bb

Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/56360

Alan Pevec (apevec)
tags: removed: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/havana)

Reviewed: https://review.openstack.org/56360
Committed: http://github.com/openstack/heat/commit/f33297d7f13eedc8e8aa5e5db294d3a725679974
Submitter: Jenkins
Branch: stable/havana

commit f33297d7f13eedc8e8aa5e5db294d3a725679974
Author: Eoghan Glynn <email address hidden>
Date: Wed Nov 13 17:47:09 2013 +0000

    Ensure autoscaling actions occur for percentage adjustment

    Fixes bug 1251007

    Previously if the AdjustmentType was set to PercentChangeInCapacity,
    then depending on the choice of the instance group MinSize and the
    scale-up policy ScalingAdjustment, no autoscaling actions may occur
    even when the under-scaled alarm fires.

    This situation occurred if:

       (MinSize * ScalingAdjustment / 100.0) < 1.0

    in which case the group never get gets scaled up even if the under-
    scaled alarm stays in the alarm state forever.

    Now we follow the rounding rules used by AWS Autoscaling:

      http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/as-scale-based-on-demand.html

    Change-Id: I79e5e743de1944ace5ef2c4dbcb76c9cab7262bb
    (cherry picked from commit 5720e6d647ce3a273d638fd7dacc9c2d6eb2bc22)

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.