0

I'm writing a cloudify recipe and I am trying to manage the HA. In the cloudify doc, i saw the following concerning the "stopDetection" probe:

It is important to note that Cloudify will invoke the restart event if you implemented one and the start event will only serve as a fallback.

Does it means that cloudify has a "restart" lifecycle event (such as start, stop)?

Thanks.

Ulky Igor
  • 322
  • 5
  • 16

1 Answers1

1

The "stopDetection" life cycle event handler notifies Cloudify that the process is dead and then as a result, Cloudify invokes the "start" life cycle event handler. - This means that the process is restarted and NOT the VM.

Cloudify 2.7* doesn't have a VM "restart" event handler.

If you need to restart a vm via Cloudify, you can use the Cloudify maintenance mode.

HTH,

Tamir.

tamirko
  • 499
  • 5
  • 12
  • Hello. Thanks for the answer. Let's focus on this part of the quote: <...**Cloudify will invoke the restart event if you implemented one**...> This seems to say that I can implement an event to be called when Cloudify will try to restart processes due to a failover. I understand that it is not the VM which is restarted, but some processes. My goal is to provide my own script to be run when a failover occur, instead of letting the start script to be run again (as a fallback as said in the doc) – Ulky Igor Aug 26 '14 at 07:48
  • We will fix the documentation ASAP. It should be something like : "Cloudify will invoke the postStop event if you implemented one..." – tamirko Aug 26 '14 at 10:52
  • Ok. But I it seems quite weird to call the "postStop" as the event for processes restarting :) Is it possible for you to provide a "restart" event lifecycle? It would be great! Thanks. – Ulky Igor Aug 27 '14 at 09:25
  • postStop is not restart. I was just referring to your question. This life cycle event handler is invoked after the service is stopped. Cloudify 2.7* doesn't have a VM "restart" event handler. If you need to restart a vm via Cloudify, you can use the Cloudify maintenance mode. – tamirko Aug 28 '14 at 13:21