Ask Your Question
0

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

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

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
0

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

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:

resource_registry:
  resources:
    my_server:
      hooks: pre-delete
    my_database:
      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

Comments

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 -0500 )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 -0500 )edit

Ok thank you

samah gravatar imagesamah ( 2017-02-28 12:14:20 -0500 )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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 408 times

Last updated: Feb 27 '17