diff options
author | Zane Bitter <zbitter@redhat.com> | 2018-07-12 18:12:14 -0400 |
---|---|---|
committer | David Peacock <david.j.peacock@gmail.com> | 2019-12-23 18:41:27 +0000 |
commit | fc4d432792141ad2bc657123f341653d4f1937c0 (patch) | |
tree | 4e9932bdc69cf9dc6b044f197ac11412d44dacdc /heat | |
parent | 28ce9f3ad42e1a4713dea845bcc4bdc5a6d08fb9 (diff) | |
download | heat-fc4d432792141ad2bc657123f341653d4f1937c0.tar.gz |
Don't get frozen definitions for resource being deleted
At the start of a legacy stack update, we calculate the frozen definitions
for all of the existing resources. This is so that we can later compare
them against the new resources to see if they need to be updated.
Since resources that are being deleted (i.e. don't appear in the new
template) won't ever need to be compared to the new definitions, there's no
need for us to calculate this data.
Apparently there are (extremely rare) situations where getting the frozen
definitions will fail, so this at least gives users an opportunity to
recover by deleting only the resources causing trouble rather than the
whole stack.
Change-Id: I04bed83cc2181e1e61bf90c2f259cfd123362b06
Story: 2002966
Task: 22972
Diffstat (limited to 'heat')
-rw-r--r-- | heat/engine/update.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/heat/engine/update.py b/heat/engine/update.py index cd8baba62..a3cf92696 100644 --- a/heat/engine/update.py +++ b/heat/engine/update.py @@ -39,7 +39,8 @@ class StackUpdate(object): self.rollback = rollback self.existing_snippets = dict((n, r.frozen_definition()) - for n, r in self.existing_stack.items()) + for n, r in self.existing_stack.items() + if n in self.new_stack) def __repr__(self): if self.rollback: |