when updating a TemplateResource, heat does not use the new template

Bug #1254966 reported by Angus Salkeld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
High
Angus Salkeld

Bug Description

If you update the template of a TemplateResource then do a stack update, heat ignores the new template as it is in the
files section of the newstack.t

We need to replace the template.files of the current stack with the updated one.

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → High
assignee: nobody → Angus Salkeld (asalkeld)
Revision history for this message
Angus Salkeld (asalkeld) wrote :

Also when deciding whether or not to update or replace we need to inspect the schema of each (properties and attributes) and replace if the schema has changed.

Angus Salkeld (asalkeld)
Changed in heat:
status: New → Confirmed
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/58723

Changed in heat:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/59174
Committed: http://github.com/openstack/heat/commit/c077589be0af4b33930ce6e0793575806daedeb1
Submitter: Jenkins
Branch: master

commit c077589be0af4b33930ce6e0793575806daedeb1
Author: Angus Salkeld <email address hidden>
Date: Wed Dec 4 22:19:19 2013 +1100

    Pass the files correctly though the update mechanism

    By "files", we mean the TemplateResource templates that get
    passed into stack create and update.

    The files are critical to the definition of TemplateResources
    so we need to have the correct version of them in each stage
    of the update.

    Within the update there are 3 stacks:
    - existing (stack been updated)
    - newstack (the goal state)
    - previous (a snapshot of the initial stack)

    To update TemplateResources we need the existing stack to have access
    to the new "files" but the previous stack must contain the old set (or empty).
    This way the TemplateResource can get access to the new template and find the
    difference to the previous template.

    Note: although there are no tests in this patch, a following fully uses
    and tests this functionality.

    Partial-bug: #1254966
    Change-Id: I803a385940759a4eb04df1eccce166be24ee333c

Angus Salkeld (asalkeld)
Changed in heat:
milestone: none → icehouse-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit a1e90afac4ab504b299e58c6902f25a2fec3ca66
Author: Angus Salkeld <email address hidden>
Date: Mon Jan 6 10:55:21 2014 +1100

    Introduce a way to trace a resource's implementation

    We need a way to know whether a resource is really the
    same during update. This is driven by TemplateResource
    but not totally specific to it.

    The problem is:
    if you update a template with no changes (except for environment
    or files changes) we need to know which resources to update.

    This patch adds a "implementation_signature()" method that gives
    us a mechanism to keep track of implementation changes like:
    - a change in an environment mapping a resource to a new/different implementation
    - a change in the content of a TemplateResource

    And can distinguish between schema changes (requiring replacement) and
    incremental changes (that can be updated in place).

    Change-Id: I780074a827e3f51dede47a81f15e29dbe4d08804
    Closes-bug: #1254966

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: icehouse-2 → 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.