Updating stack with new flavor in resourcegroup with flavor_update_policy: resize still does a replace

Bug #1380612 reported by vigneshvar
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Steven Hardy

Bug Description

When the template is updated to a new flavor inside OS::Heat::ResourceGroup, with flavor_update_policy as RESIZE, the instances are still replaced instead of resizing.

Template Used:
============

heat_template_version: 2013-05-23

description: Simple Resource Group template

resources:
  compute_instances:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      resource_def:
        type: OS::Nova::Server
        properties:
          flavor_update_policy: RESIZE
          flavor: m1.nano
          image: cirros-0.3.2-x86_64-uec
          key_name: default
          name: ScaleOut

Steps to reproduce:
===============

1. Create a stack with above mentioned template.
     heat stack-create stack1 -f <path to above template>
2. Check nova list for the instance and note the IP and status
     nova list | grep stack1
2. modify the template value "flavor" to m1.micro from m1.nano
3. Update the stack with the modified template
    heat stack-update stack1 -f <path to modified template>
4. Check nova list for instance status
5. You can see that new instances with modified flavors are created and existing instances are deleted.
6. Expected behavior, instances getting into resizing state, which does not happen now.

Qiming Teng (tengqim)
Changed in heat:
status: New → Confirmed
assignee: nobody → Qiming Teng (tengqim)
summary: Updating stack with new flavor in resourcegroup with
- flavor_update_police: resize still does a replace
+ flavor_update_policy: resize still does a replace
Revision history for this message
Steven Hardy (shardy) wrote :

I've posted a patch for bug #1396533 which I believe may fix this issue too, in which case we can close this as a duplicate (I know, technically the other bug is the duplicate..)

Changed in heat:
assignee: Qiming Teng (tengqim) → Steven Hardy (shardy)
status: Confirmed → In Progress
Steven Hardy (shardy)
Changed in heat:
importance: Undecided → High
milestone: none → kilo-1
tags: added: tripleo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit d5c84e5defdaccf6292ad154641a1197f827a949
Author: Steven Hardy <email address hidden>
Date: Tue Dec 2 12:04:59 2014 +0000

    ResourceGroup allow update of resource_def

    Currently the group is replaced if the resource_def is updated,
    but instead we should allow updates and update the underlying
    nested stack instead. This allows properties to be changed
    such that non-replacement updates can be performed on the
    resource-group members.

    Change-Id: I471b7ebe71ed262a8b0e2c971a32afc7062699cb
    Closes-Bug: #1396533
    Closes-Bug: #1380612

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/141820

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/juno)

Reviewed: https://review.openstack.org/141820
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=edf0198151214336ab0d04bfc0e48e30c12864dd
Submitter: Jenkins
Branch: stable/juno

commit edf0198151214336ab0d04bfc0e48e30c12864dd
Author: Steven Hardy <email address hidden>
Date: Tue Dec 2 12:04:59 2014 +0000

    ResourceGroup allow update of resource_def

    Currently the group is replaced if the resource_def is updated,
    but instead we should allow updates and update the underlying
    nested stack instead. This allows properties to be changed
    such that non-replacement updates can be performed on the
    resource-group members.

    Change-Id: I471b7ebe71ed262a8b0e2c971a32afc7062699cb
    Closes-Bug: #1396533
    Closes-Bug: #1380612
    (cherry picked from commit d5c84e5defdaccf6292ad154641a1197f827a949)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 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.