[openstack-dev] [Heat] question about stack updates, instance groups and wait conditions

Christopher Armstrong chris.armstrong at rackspace.com
Fri Sep 20 19:22:19 UTC 2013


Hello Simon! I've put responses below.

On Tue, Sep 17, 2013 at 7:57 AM, Simon Pasquier <simon.pasquier at bull.net>
wrote:
> Hello,
>
> I'm testing stack updates with instance group and wait conditions and I'd
> like to get feedback from the Heat community.
>
> My template declares an instance group resource with size = N and a wait
> condition resource with count = N (N being passed as a parameter of the
> template). Each group's instance is calling cfn-signal (with a different
> id!) at the end of the user data script and my stack creates with no
error.
>
> Now when I update my stack to run N+X instances, the instance group gets
> updated with size=N+X but since the wait condition is deleted and
recreated,
> the count value should either be updated to X or my existing instances
> should re-execute cfn-signal.

This is a pretty interesting scenario; I don't think we have a very good
solution for it yet.

> To cope with this situation, I've found 2 options:
> 1/ declare 2 parameters in my template: nb of instances (N for creation,
N+X
> for update) and count of wait conditions (N for creation, X for update).
See
> [1] for the details.
> 2/ declare only one parameter in my template (the size of the group) and
> leverage cfn-hup on the existing instances to re-execute cfn-signal. See
[2]
> for the details.
>
> The solution 1 is not really user-friendly and I found that solution 2 is
a
> bit complicated. Does anybody know a simpler way to achieve the same
result?


I definitely think #1 is better than #2, but you're right, it's also not
very nice.

I'm kind of confused about your examples though, because you don't show
anything that depends on ComputeReady in your template. I guess I can
imagine some scenarios, but it's not very clear to me how this works. It'd
be nice to make sure the new autoscaling solution that we're working on
will support your case in a nice way, but I think we need some more
information about what you're doing. The only time this would have an
effect is if there's another resource depending on the ComputeReady *that's
also being updated at the same time*, because the only effect that a
dependency has is to wait until it is met before performing create, update,
or delete operations on other resources. So I think it would be nice to
understand your use case a little bit more before continuing discussion.

-- 
IRC: radix
Christopher Armstrong
Rackspace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20130920/19269fc1/attachment.html>


More information about the OpenStack-dev mailing list