Exceptions when adding implicit dependencies cause stacks to be unloadable

Bug #1554625 reported by Zane Bitter
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Zane Bitter

Bug Description

There have been a number of errors caused by the code to add implicit dependencies for a particular resource type (i.e. overriding Resource.add_dependencies() - something used heavily by Neutron resources) raising an exception. If this exception occurs in a non-deterministic way (e.g. it depends on external state) then we can get into a situation where a stack can be created but we cannot load it from the DB again to delete (or even show) it. Examples of this class of error include bug 1442121 and bug 1536515.

While we always need to fix plugins that are broken in this way, since it is a common programming error we also need to prevent plugins with this problem from breaking Heat and leaving stacks undeletable.

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

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

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

commit 38a46e8d21602e1ebed22c38ba53c0095c6be609
Author: Zane Bitter <email address hidden>
Date: Tue Mar 8 11:35:12 2016 -0500

    Catch exceptions calculating implicit dependencies

    Uncaught exceptions in an overridden add_dependencies() method of a plugin
    can prevent a stack being loaded from the database. To protect against
    programming errors that can result in uncaught exceptions, separate the
    calculation of implicit dependencies out from the calculation of explicit
    dependencies, and ignore exceptions in the latter when dealing with an
    existing stack.

    Change-Id: I939dba57eeba5710bb77a1b30a872fca5d38ad71
    Closes-Bug: #1554625

Changed in heat:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/heat 6.0.0.0rc1

This issue was fixed in the openstack/heat 6.0.0.0rc1 release candidate.

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

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

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

commit d263687f8469a3c7f7897484405c76b671f02fd6
Author: Johannes Grassler <email address hidden>
Date: Wed Mar 30 09:55:37 2016 +0200

    Warn against API calls in plugin guide

    API calls raising uncaught exceptions have previously caused problems,
    especially when deleting stacks or cleaning up after a stack's partial
    deletion. This commit explicitely documents this pitfall.

    Change-Id: If86ef0deb5b8eaa1a0665c07bfddcfe52994f249
    Related-Bug: #1554625

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

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

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

commit 3cb015e41015679af71c788b516c7de8280f3a30
Author: Zane Bitter <email address hidden>
Date: Tue Mar 8 11:35:12 2016 -0500

    Catch exceptions calculating implicit dependencies

    Uncaught exceptions in an overridden add_dependencies() method of a plugin
    can prevent a stack being loaded from the database. To protect against
    programming errors that can result in uncaught exceptions, separate the
    calculation of implicit dependencies out from the calculation of explicit
    dependencies, and ignore exceptions in the latter when dealing with an
    existing stack.

    Change-Id: I939dba57eeba5710bb77a1b30a872fca5d38ad71
    Closes-Bug: #1554625
    (cherry picked from commit 38a46e8d21602e1ebed22c38ba53c0095c6be609)

tags: added: in-stable-liberty
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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers