ASG/RG Rolling update fails when nested template location changes

Bug #1765454 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rabi Mishra

Bug Description

ASG/RG rolling update fails when a new child template location is used and the templates in the old location does not exist.

For example when using relative paths in heat templates, if the folder is moved to a new one and stack updated, stack update fails.

$cat rsg_server.yaml

heat_template_version: queens
resources:
  asg_servers:
    update_policy:
      rolling_update:
        max_batch_size: 1
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      resource_def:
        type: server.yaml

$cat server.yaml

heat_template_version: queens
resources:
  server:
    type: OS::Nova::Server
    properties:
      image: cirros-0.3.5-x86_64-disk
      flavor: m1.tiny
      networks:
        network: private

1) $ cd templates
2) $ openstack stack create -t rsg_server.yaml
3) Wait until stack is CREATE_COMPLTE
4) $ mv templates templates_moved
5. $ cd templates_moved
5) $ openstack stack update -t rsg_server.yaml
6) Update fails

Rabi Mishra (rabi)
Changed in heat:
assignee: nobody → Rabi Mishra (rabi)
importance: Undecided → Medium
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/562727

Changed in heat:
status: New → In Progress
Revision history for this message
Zane Bitter (zaneb) wrote :

I think this actually raises a bigger issue, which is that our rolling updates aren't, to the extent that the 'update' consists of changing the scaled unit's provider template and not just the resource definition. All of the members are updated on the first update.

When only the child template is changed, all of the resources will be updated on the first update and there will be no rolling update even if the user requested one.

When both the child template and the resource definition are changed, for example to add a new parameter, some resources will get an unholy mix of the old resource definition with the new template for a while. If e.g. a new parameter was added with a non-default value, this will actually cause errors and prevent the rolling update from working.

It's reasonable to try to get a fix to this more limited issue first though, so I raised bug 1767514 to cover the rest.

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/562727
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=d42f863dc54ecad2f99800be42bf42312dbff0d2
Submitter: Zuul
Branch: master

commit d42f863dc54ecad2f99800be42bf42312dbff0d2
Author: rabi <email address hidden>
Date: Wed May 9 10:26:03 2018 +0530

    Keep old files in file map for rolling update

    We would need old resource definitions when doing rolling update of certain
    group resources like RG/ASG. Therefore update the file map with the files
    from old template.

    Change-Id: I8f880e5b23c25159ecab1c63b594329d8df33973
    Closes-Bug: #1765454
    Task: #17360
    Story: #1765454

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 11.0.0.0b2

This issue was fixed in the openstack/heat 11.0.0.0b2 development milestone.

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.