<div dir="ltr">Thanks Everyone!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 10, 2014 at 5:59 AM, Steven Hardy <span dir="ltr"><<a href="mailto:shardy@redhat.com" target="_blank">shardy@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mon, Jun 09, 2014 at 11:15:19AM -0400, Aaron Knister wrote:<br>
> Hi Everyone,<br>
><br>
> I instantiated a stack within Heat that contains a simple launch<br>
> configuration and autoscaling group (template listed below). The stack<br>
> came up and the instance started, however when I killed the instance (nova<br>
> delete XXX) it wasn't restarted...on AWS if a CloudFormation instance gets<br>
> killed it seems to be restarted. This is without me defining any health<br>
> monitors. How can I achieve the same behavior with OpenStack?<br>
<br>
</div>Currently, Heat requires explicit definition of an alarm, so we won't<br>
automatically launch a new instance when you delete one out-of-band via<br>
nova delete.<br>
<br>
Here's some examples which use a heartbeat alarm, which would be one way of<br>
implementing what you want via heat:<br>
<br>
<a href="https://github.com/openstack/heat-templates/blob/master/cfn/F17/WordPress_Single_Instance_With_IHA.template#L117" target="_blank">https://github.com/openstack/heat-templates/blob/master/cfn/F17/WordPress_Single_Instance_With_IHA.template#L117</a><br>
<br>
<a href="https://github.com/openstack/heat-templates/blob/master/cfn/F17/AutoScalingMultiAZSample.template#L141" target="_blank">https://github.com/openstack/heat-templates/blob/master/cfn/F17/AutoScalingMultiAZSample.template#L141</a><br>
<br>
You could combine those two examples, such that the Alarm resource defines<br>
a heartbeat alarm instead of MemoryUtilization, then you could set the<br>
threshold to define how many active instances you want to maintain.<br>
<br>
It sounds like we should potentially align with the AWS behavior as a<br>
future enhancement, but we'd need notifications from nova when a VM gets<br>
deleted, or some way to get ceilometer to alarm if an instance is removed<br>
or shut down, neither of which exist in heat right now.<br>
<br>
Hope that helps.<br>
<br>
Steve<br>
</blockquote></div><br></div>