Prevent unnecessary stack.push in Instance::releaseResources

All stack resources will be released if current CloudRegion object
should be destroyed (isDoomed). There is no reason to push stack into Heat
for each released instance.

Change-Id: Id393d668e0c26c3fc47009f9dc68827618999397
Closes-bug: #1628905
This commit is contained in:
Snihyr Kostyantyn 2016-09-27 21:58:24 +03:00
parent fc661eba84
commit 510583ffff
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ Methods:
Body:
- $region: $.getRegion()
- $template: $region.stack.current()
- If: $template.get(resources) and $template.get(outputs)
- If: $template.get(resources) and $template.get(outputs) and not sys:GC.isDoomed($region)
Then:
- $region.stack.push()
- $.setAttr(instanceResources, [])