New parameters can break template resources

Bug #1543685 reported by Thomas Herve
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Zane Bitter
Kilo
Fix Released
Undecided
Unassigned

Bug Description

If an update fails on a template resource which has a new parameter without a default, retrying the update will fail forever with a "Property XXX not assigned error". The issue is that we store the new template in the stack files, but still store the old resource in the resource properties data. We should try to workaround that.

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/277984

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

Note that there's no completely correct way to resolve this issue other than switching to convergence. Currently we merge the new files dict into the old one and store it with the stack after a failed update. This means that resources that were processed before the failure will correctly see the new template in the files dict, but those not processed will also see the new one where they should have seen the old one. Since the same template may be used by multiple resources, some of which may be updated while others are not, there is no correct answer as long as we only have one copy of the file.

Convergence resolves this by having each resource refer to the template and environment it was created from.

Users can avoid this problem by renaming any child templates whenever their interfaces change in a way that wouldn't be backwards compatible with their old parent stack (e.g. by adding new mandatory parameters).

Changed in heat:
assignee: Thomas Herve (therve) → Zane Bitter (zaneb)
Zane Bitter (zaneb)
tags: added: kilo-backport-potential liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/278828

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/278829

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee
Author: Thomas Herve <email address hidden>
Date: Tue Feb 9 18:33:19 2016 +0100

    Ignore errors on old properties during update

    When an update fails on a template resource, we still store the template
    in the stack environment. Retrying the update will fail because of
    missing parameters, but we can ignore those as they should be harmless
    and only matter in this broken case.

    Change-Id: I859ea72b1cc95162b6f498b6af65e4d9fdd9458f
    Closes-Bug: #1543685

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

Reviewed: https://review.openstack.org/278828
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=ec9404a6644224647c787ea7f991d518d75651ff
Submitter: Jenkins
Branch: stable/liberty

commit ec9404a6644224647c787ea7f991d518d75651ff
Author: Thomas Herve <email address hidden>
Date: Tue Feb 9 18:33:19 2016 +0100

    Ignore errors on old properties during update

    When an update fails on a template resource, we still store the template
    in the stack environment. Retrying the update will fail because of
    missing parameters, but we can ignore those as they should be harmless
    and only matter in this broken case.

    Change-Id: I859ea72b1cc95162b6f498b6af65e4d9fdd9458f
    Closes-Bug: #1543685
    (cherry picked from commit 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee)

tags: added: in-stable-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/286874

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (stable/liberty)

Related fix proposed to branch: stable/liberty
Review: https://review.openstack.org/286879

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (master)

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

commit 79c410d92326e63c8bf3752922c35abf6264e211
Author: Zane Bitter <email address hidden>
Date: Tue Mar 1 17:56:33 2016 -0500

    Ignore TypeErrors on old properties during update

    Extend the approach from 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee of
    ignoring ValueErrors in the _previous_ properties when doing an update to
    also ignoring TypeErrors.

    Change-Id: Ic08165fe031e1764cfb34eaf782d3e105f04fee3
    Closes-Bug: #1538551
    Related-Bug: #1543685

Changed in heat:
milestone: none → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (stable/liberty)

Reviewed: https://review.openstack.org/286879
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=94a840d486d60523daeaf9c35c9f55351518842e
Submitter: Jenkins
Branch: stable/liberty

commit 94a840d486d60523daeaf9c35c9f55351518842e
Author: Zane Bitter <email address hidden>
Date: Tue Mar 1 17:56:33 2016 -0500

    Ignore TypeErrors on old properties during update

    Extend the approach from 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee of
    ignoring ValueErrors in the _previous_ properties when doing an update to
    also ignoring TypeErrors.

    Change-Id: Ic08165fe031e1764cfb34eaf782d3e105f04fee3
    Closes-Bug: #1538551
    Related-Bug: #1543685
    (cherry picked from commit 79c410d92326e63c8bf3752922c35abf6264e211)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to heat (stable/kilo)

Related fix proposed to branch: stable/kilo
Review: https://review.openstack.org/287272

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0b3

This issue was fixed in the openstack/heat 6.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/kilo)

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

commit 37c9f45663775b0c23291f4725b7ba46b9016282
Author: Thomas Herve <email address hidden>
Date: Tue Feb 9 18:33:19 2016 +0100

    Ignore errors on old properties during update

    When an update fails on a template resource, we still store the template
    in the stack environment. Retrying the update will fail because of
    missing parameters, but we can ignore those as they should be harmless
    and only matter in this broken case.

    Change-Id: I859ea72b1cc95162b6f498b6af65e4d9fdd9458f
    Closes-Bug: #1543685
    (cherry picked from commit 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee)

tags: added: in-stable-kilo
Zane Bitter (zaneb)
tags: removed: kilo-backport-potential liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to heat (stable/kilo)

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

commit 121f5312185a5ade30889ed975cd2091dc63f288
Author: Zane Bitter <email address hidden>
Date: Tue Mar 1 17:56:33 2016 -0500

    Ignore TypeErrors on old properties during update

    Extend the approach from 1cfde62b2ff8a60c8cc3a9ef4926e5f4a7116aee of
    ignoring ValueErrors in the _previous_ properties when doing an update to
    also ignoring TypeErrors.

    Change-Id: Ic08165fe031e1764cfb34eaf782d3e105f04fee3
    Closes-Bug: #1538551
    Related-Bug: #1543685
    (cherry picked from commit 79c410d92326e63c8bf3752922c35abf6264e211)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/heat 2015.1.4

This issue was fixed in the openstack/heat 2015.1.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 5.0.2

This issue was fixed in the openstack/heat 5.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/heat 2015.1.4

This issue was fixed in the openstack/heat 2015.1.4 release.

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.