settingsLogin | Registersettings

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

0 votes

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.

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.

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.

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?

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?

Thanks,
James


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
asked Nov 9, 2017 in openstack-dev by James_Wettenhall (160 points)   1 1

2 Responses

0 votes

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
CREATECOMPLETE event with the UPDATECOMPLETE 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.

cheers,
Zane.


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 9, 2017 by Zane_Bitter (21,640 points)   4 6 11
0 votes

Thanks Zane,

I had a look at the events for the resource in question, and the only
change I can see in the resource properties before and after the "update"
is that the "flavor" has changed from a numerical ID ("0") to a string
("m1.small").

I haven't found any unintended side effects of the "update" on the test
stack, so I'm planning to go ahead and run the stack update on production.

We're not using any parameter values or get_attr.

Cheers,
James


OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
responded Nov 10, 2017 by James_Wettenhall (160 points)   1 1
...