Convergence doesn't check resource types on update

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

Bug Description

In the legacy update code path, we check to see whether the type of a resource has changed before doing an update on it:

http://git.openstack.org/cgit/openstack/heat/tree/heat/engine/update.py?h=stable/kilo#n143

Doing an in-place update from one resource type to another makes no sense, so we always follow the update-replace path on such a change.

AFAICT convergence has no equivalent logic, so it needs to be added.

Just to make it interesting, the current code is incorrect (bug 1508115) because it compares using the type name strings. It should really compare by class (i.e. if the new & old names map to the same class, updating in place is fine, and if they don't it isn't). This should get fixed for the legacy path by https://review.openstack.org/#/c/238194/ but it may be tricky to implement for convergence because it requires access to both the old and new environments.

Rakesh H S (rh-s)
Changed in heat:
assignee: nobody → Rakesh H S (rh-s)
Changed in heat:
status: New → In Progress
Changed in heat:
assignee: Rakesh H S (rh-s) → Anant Patil (ananta)
Changed in heat:
assignee: Anant Patil (ananta) → Rakesh H S (rh-s)
Changed in heat:
assignee: Rakesh H S (rh-s) → Anant Patil (ananta)
Changed in heat:
assignee: Anant Patil (ananta) → Rabi Mishra (rabi)
Rabi Mishra (rabi)
Changed in heat:
assignee: Rabi Mishra (rabi) → Anant Patil (ananta)
Changed in heat:
assignee: Anant Patil (ananta) → Rabi Mishra (rabi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit 4ace6a3e06aa873629003706951f29dd4ffcf337
Author: Anant Patil <email address hidden>
Date: Mon Nov 23 18:18:44 2015 +0530

    Convergence: Check resource class before updating

    Check the resource class and raise UpdateReplace if the class of new and
    old doesn't match.

    Change-Id: I905514bbbc02f54ce69a7fab9e89a49cb138f29a
    Partial-Bug: #1512343
    Closes-Bug: #1513233

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.0b3

This issue was fixed in the openstack/heat 6.0.0.0b3 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.