[openstack-dev] [heat] Meaning of "updated" in stack update preview / --dry-run?

Zane Bitter zbitter at redhat.com
Thu Nov 9 15:54:42 UTC 2017

On 08/11/17 07:19, James Wettenhall wrote:
> Hi,
> I have some stacks created by heat which I want to update.
> I download the current template with "heat template-show".
> Then before modifying the template, I try running "heat stack-update" 
> with "--dry-run" to see what will be changed (if anything).
> Sometimes, I see some resources (VMs) listed as "updated" in the stack 
> update preview, even though I haven't yet modified the template.

Note that it also takes into account parameter values and (prior to 
Pike) data obtained from other resources via e.g. get_attr. So a change 
in that data could definitely cause a resource to be updated without any 
change in the template.

Of course we can't rule out a bug in the update preview code in Heat either.

> It's not obvious to me how to find out more about what will be 
> "updated", and without knowing, I'm a little nervous about performing 
> the update on a production stack.

Yeah, it's a shame Heat doesn't report that info (which it _does_ have).

FWIW, it's when you see a resource listed as "replaced" that you should 
really panic. You're right to be a little nervous though, because it is 
*not* guaranteed that a resource in the "updated" list cannot get replaced.

> When I run the stack update on a test stack, it seems to run fine, and I 
> don't notice any changes applied to the resources (VMs) which would 
> supposedly be "updated".  Then subsequent stack update previews on the 
> test stack don't show that any resources will be updated - the 
> unexpected "updated" status only appears once, until I go ahead and run 
> "heat stack-update" without --dry-run.

Since you've tried it on a test stack, here's one thing you can do: look 
at the events for the resource in question and see (a) if it did in fact 
get updated, and (b) what the property values were before and after the 
update. (These get stored in the event, so compare e.g. the 
CREATE_COMPLETE event with the UPDATE_COMPLETE event and you should be 
able to spot some change in the properties.)

> Is the unexpected "updated" status of these VM resources likely to have 
> been caused by a change made by my OpenStack administrators e.g. 
> upgrading their OpenStack version?

Not likely, no.

> Should I stop worrying about the "updated" status of these resources in 
> the stack update preview, and just assume that if the stack update works 
> on my test stack with no unintended side effects as far as I can tell, 
> then it should work on production?

Probably, but I would try to find out exactly what happened on your test 
stack first to make sure you're comfortable with it.


More information about the OpenStack-dev mailing list