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.
Reviewed: https:/ /review. openstack. org/248676 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=4ace6a3e06a a87362900370695 1f29dd4ffcf337
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4ace6a3e06aa873 629003706951f29 dd4ffcf337
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: I905514bbbc02f5 4ce69a7fab9e89a 49cb138f29a
Partial-Bug: #1512343
Closes-Bug: #1513233