[Openstack] Heat stack instance health checks

Steven Hardy shardy at redhat.com
Tue Jun 10 09:59:47 UTC 2014


On Mon, Jun 09, 2014 at 11:15:19AM -0400, Aaron Knister wrote:
>    Hi Everyone,
> 
>    I instantiated a stack within Heat that contains a simple launch
>    configuration and autoscaling group (template listed below). The stack
>    came up and the instance started, however when I killed the instance (nova
>    delete XXX) it wasn't restarted...on AWS if a CloudFormation instance gets
>    killed it seems to be restarted. This is without me defining any health
>    monitors. How can I achieve the same behavior with OpenStack?

Currently, Heat requires explicit definition of an alarm, so we won't
automatically launch a new instance when you delete one out-of-band via
nova delete.

Here's some examples which use a heartbeat alarm, which would be one way of
implementing what you want via heat:

https://github.com/openstack/heat-templates/blob/master/cfn/F17/WordPress_Single_Instance_With_IHA.template#L117

https://github.com/openstack/heat-templates/blob/master/cfn/F17/AutoScalingMultiAZSample.template#L141

You could combine those two examples, such that the Alarm resource defines
a heartbeat alarm instead of MemoryUtilization, then you could set the
threshold to define how many active instances you want to maintain.

It sounds like we should potentially align with the AWS behavior as a
future enhancement, but we'd need notifications from nova when a VM gets
deleted, or some way to get ceilometer to alarm if an instance is removed
or shut down, neither of which exist in heat right now.

Hope that helps.

Steve




More information about the Openstack mailing list