Missing template file on update fails silently

Bug #1452520 reported by Zane Bitter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Rico Lin
Kilo
Fix Released
Medium
Rico Lin

Bug Description

When the template file for a template/facade/provider resource is not found in the new files list when doing a stack update, Heat silently falls back to using the existing template (i.e. so no change will be made).

The cause is that the update code shares the same code path for obtaining the template as the init code. The init code needs to have a fallback, so that loading the (parent) stack never fails, however in the update case it is undesirable.

Rico Lin (rico-lin)
Changed in heat:
assignee: nobody → Rico lin (rico-lin)
Changed in heat:
status: New → Triaged
Rico Lin (rico-lin)
Changed in heat:
status: Triaged → In Progress
Revision history for this message
Rico Lin (rico-lin) wrote :

Hi Zane, I have Problem with recreate this issue. There is a checker for the remote template, so It will fail with message "Could not fetch remote template \"file:///lib/template.yaml". Is it what you mean silently?
Can you provide your test procedure and test and sample script?
Thx

Rico Lin (rico-lin)
Changed in heat:
status: In Progress → Incomplete
Revision history for this message
Zane Bitter (zaneb) wrote :

See bug 1452534 for more some details. It was originally found testing TripleO. The offending code is here: http://git.openstack.org/cgit/openstack/heat/tree/heat/engine/resources/template_resource.py?h=stable/kilo#n182

Note that the problem only occurs on update - you must have previously created the resource with a valid template, which it can then retrieve by calling self.nested().

Changed in heat:
status: Incomplete → Triaged
Changed in heat:
status: Triaged → In Progress
Revision history for this message
Rico Lin (rico-lin) wrote :
Steven Hardy (shardy)
tags: added: kilo-backport-potential
Changed in heat:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/193053

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/194200

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (stable/kilo)

Change abandoned by Rico Lin (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/193053
Reason: This is a error branch I create
now fix with https://review.openstack.org/#/c/194200/
thanks for all comment

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

Reviewed: https://review.openstack.org/194200
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a55f82715770a83e2ef3f9ce6f09c83ef5f13514
Submitter: Jenkins
Branch: stable/kilo

commit a55f82715770a83e2ef3f9ce6f09c83ef5f13514
Author: Rico Lin <email address hidden>
Date: Wed Jun 17 12:54:56 2015 +0800

    Missing template file on update fails silently

    When the template file for a template/facade/provider resource is
    not found in the new files list when doing a stack update, Heat
    silently falls back to using the existing template (i.e. so no
    change will be made).
    The cause is that the update code shares the same code path for
    obtaining the template as the init code. The init code needs to
    have a fallback, so that loading the (parent) stack never fails,
    however in the update case it is undesirable.

    Change-Id: Id12b63d9f04caba8e9325aed0ee2acf51ffe0c4c
    Closes-Bug: #1452520
    (cherry picked from commit 0c83c6f5ede0bf5d46779058ed5bea00629d5a3b)

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