Is there a way to stop Heat before adding or deleting resources?

asked 2017-02-27 03:32:08 -0600

samah gravatar image

Hi, I want to stop Heat before adding or deleting resources is there a way to do it and how?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-02-27 11:12:07 -0600

zaneb gravatar image

You can add pre-create and pre-delete hooks on resources. These are specified in the resource_registry section of an environment file, like so:

      hooks: pre-delete
      hooks: [pre-create, pre-delete]

Wildcards in resource names are allowed.

When Heat reaches the resource to create/delete it, it will pause until you use the openstack stack hook clear command to prompt Heat to continue (or until the stack times out). You can determine when Heat is paused at a hook using the openstack stack hook poll command, or configure notifications on a Zaqar queue.

edit flag offensive delete link more


Thanks, this is the case when Heat reach the resource could I use it but in the case when an alarm is triggered?

samah gravatar imagesamah ( 2017-02-28 01:55:02 -0600 )edit

I'm not sure I understand the question. There's no hook like "pre-signal" that you could trigger on. But you can set pre-create/pre-delete hooks e.g. on all the members (using a wildcard) of the nested stack for an autoscaling group.

zaneb gravatar imagezaneb ( 2017-02-28 10:57:38 -0600 )edit

Ok thank you

samah gravatar imagesamah ( 2017-02-28 12:14:20 -0600 )edit

when I use hooks for an autoscaling group I can't create stack untill I use openstack stack hook clear command and after I use it I can't create a hook an other time :/

samah gravatar imagesamah ( 2017-03-14 04:55:02 -0600 )edit

It sounds like you are adding a hook on the autoscaling group resource itself, instead of on its individual members.

zaneb gravatar imagezaneb ( 2017-03-14 10:46:50 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-02-27 03:32:08 -0600

Seen: 531 times

Last updated: Feb 27 '17