Non-destructive upgrade for structured deployments
If you attempt to update a stack containing OS::Heat::StructuredDeployments resources, so it uses the new non-deprecated OS::Heat::StructuredDeploymentGroup type instead, it deletes the group, and all of the deployments. This means that any deployment "actions" property will be misinterpreted, e.g if you have actions: CREATE, all the deployments will re-run on the update, even though it's an update, not a create. This patch use substitute class for OS::Heat::StructuredDeployments. Closes-Bug: #1622056 Change-Id: I7571c4591c32009814a11c71f785b395055e941e
This commit is contained in:
parent
b9d1e30a01
commit
503108a994
|
@ -332,7 +332,7 @@ class Resource(object):
|
|||
|
||||
def make_replacement(self, new_tmpl_id):
|
||||
# 1. create the replacement with "replaces" = self.id
|
||||
# Don't set physical_resource_id so that a create is triggered.
|
||||
# Don't set physical_resource_id so that a create is triggered.
|
||||
rs = {'stack_id': self.stack.id,
|
||||
'name': self.name,
|
||||
'properties_data': self._stored_properties_data,
|
||||
|
@ -1355,7 +1355,7 @@ class Resource(object):
|
|||
"""Checks that the physical resource is in its expected state.
|
||||
|
||||
Gets the current status of the physical resource and updates the
|
||||
database accordingly. If check is not supported by the resource,
|
||||
database accordingly. If check is not supported by the resource,
|
||||
default action is to fail and revert the resource's status to its
|
||||
original state with the added message that check was not performed.
|
||||
"""
|
||||
|
|
|
@ -242,7 +242,8 @@ class StructuredDeployments(StructuredDeploymentGroup):
|
|||
version='7.0.0',
|
||||
previous_status=support.SupportStatus(
|
||||
status=support.DEPRECATED,
|
||||
version='2014.2'))
|
||||
version='2014.2'),
|
||||
substitute_class=StructuredDeploymentGroup)
|
||||
|
||||
|
||||
def resource_mapping():
|
||||
|
|
Loading…
Reference in New Issue