AutoScalingGroup ignore "DesiredCapacity" in some conditions when updating resource

Bug #1304423 reported by Zhang Yang
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Zhang Yang

Bug Description

Update a AutoScalingGroup, "DesiredCapacity" is ignored in some conditions.

1. After auto scale, the value setted in creation will be ignored. For example:
    when creating group, the value of "DesiredCapacity" is 4, and after autoscale,
    the current capacity is 6. If you use 4 to update the group, the group will ignore it.

2. "DesiredCapacity" will be ignored if the value is zero.

Changed in heat:
assignee: nobody → Zhang Yang (neil-zhangyang)
Changed in heat:
status: New → Triaged
importance: Undecided → Medium
milestone: none → juno-1
description: updated
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/87204

Changed in heat:
status: Triaged → In Progress
Revision history for this message
Zhang Yang (neil-zhangyang) wrote :

I'm working on condition 1 for one day, but still have no idea. when you update the resource, the updater compares the old
template with the new template to decide whether the resource should be updated, but when autoscalegroup adjusts, the
stored template wouldn't be updated, and I don't think it is a good idea to update raw_template directly. Does any have a idea
about it?

Revision history for this message
Zane Bitter (zaneb) wrote :

The documentation for "DesiredCapacity" says that it is the "Desired initial number of instances". So I don't think it is a bug that it is ignored on updates when it hasn't changed.

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to heat (master)

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

commit a41442e8737b19b02f5c18cf004bd95e9bbde006
Author: Zhang Yang <email address hidden>
Date: Mon Apr 14 00:25:46 2014 -0700

    Allow DesiredCapacity to be zero

    When updating or validating a AutoScaleGroup,
    'DesiredCapacity' is ignored if the value is 0.

    - Add validation for 'DesiredCapacity' if the value is 0,
    - Don't ignore zero when updating.

    Change-Id: I830aaf97ebed6b2c77c72b18dc8d222ce23f9a28
    Partial-Bug: #1304423

Thierry Carrez (ttx)
Changed in heat:
milestone: juno-1 → juno-2
Revision history for this message
Steven Hardy (shardy) wrote :

What's the status of this, the patch above is marked Partial-Bug but no subsequent patch has been proposed - is this bug fix actually completed?

Revision history for this message
Zhang Yang (neil-zhangyang) wrote :

shardy:
       To fix this, we may need to change the resource update logic .And then talked with zaneb, he didn't think It's a bug.

Revision history for this message
Steven Hardy (shardy) wrote :

Ref comment #6 I'm going to consider https://review.openstack.org/#/c/87204/ as the completed fix for this bug, and mark the bug fix committed.

Zhang Yang if you disagree with zaneb and believe there is additional work to do, please raise a new bug with details of what needs to be done, thanks!

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: juno-2 → 2014.2
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.