Failed to update autoscaling group

Bug #1429134 reported by Kairat Kushaev
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Angus Salkeld

Bug Description

Hi guys,
I checked the list of bugs but I didn't find the bug I am reporting.
We found this bug during testing Heat with Rally.
The test case is the following:
1. Create the autoscaling group:
heat_template_version: 2013-05-23

resources:
  test_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      desired_capacity: 0
      max_size: 0
      min_size: 0
      resource:
        type: OS::Heat::RandomString
  test_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: test_group }
      scaling_adjustment: 1
The stack status is CREATE_COMPLETE.
2. Update the stack with the same template (except scaling_adjustment):
heat_template_version: 2013-05-23

resources:
  test_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      desired_capacity: 0
      max_size: 0
      min_size: 0
      resource:
        type: OS::Heat::RandomString
  test_policy:
    type: OS::Heat::ScalingPolicy
    properties:
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: test_group }
      scaling_adjustment: -1

The stack status becomes UPDATE_FAILED.
The rally log is here:
http://logs.openstack.org/88/152388/19/check/gate-rally-dsvm-rally/0744dc7/rally-plot/results.html.gz#/HeatStacks.create_update_delete_stack-3/failures

The rootcause is here:
if nested_stack.state != (nested_stack.UPDATE,
                                              nested_stack.COMPLETE):
            raise exception.Error(_("Nested stack UPDATE failed: %s") %
                                  nested_stack.status_reason)
We need to add check for updater into condition because updater can be None in some cases.

Changed in heat:
assignee: nobody → Kairat Kushaev (kkushaev)
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

Guys, I prepared a patch for it.
Waiting for bug to be confirmed.

Changed in heat:
status: New → In Progress
Revision history for this message
Angus Salkeld (asalkeld) wrote :
Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
milestone: none → kilo-3
Changed in heat:
assignee: Kairat Kushaev (kkushaev) → Angus Salkeld (asalkeld)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/163743
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=50cc71e33c40a9e3be604b16f77d3c3cf030a63b
Submitter: Jenkins
Branch: master

commit 50cc71e33c40a9e3be604b16f77d3c3cf030a63b
Author: kairat_kushaev <email address hidden>
Date: Mon Mar 16 11:32:24 2015 +1000

    Remove capacity check from AWS::AG update

    When heat is trying to update autoscaling group resource with
    the same template an exception is raised because nested stack
    is not in (UPDATE, COMPLETE) state. It happens because heat
    doesn't change the state of nested stacks if size of Autoscaling
    group has not been changed. So fix allows handle_update in
    AWS::AutoscalingGroup to launch resize despite of changes
    in AG capacity.

    Change-Id: Ibb71f31f2ec7d1d37b995323a2474b799ea498bb
    Closes-bug: #1429134

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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