I am stuck at strange situation regarding the FT HOST_HOOK.
I have HOST_HOOK configured to trigger on “ERROR” state. Before starting to migrate it is waiting 10 *monitoring_interval (seconds) and re-checking the host state.
The problem is that at this time the host.state is changed to 5 (MONITORING_ERROR). Your example script is configured to do the fail-over only if the state is 3 (ERROR): https://github.com/OpenNebula/one/blob/master/share/hooks/host_error.rb#L117
Is it ok to change the logic to trigger the VM migration procedure action if the state is 3 OR 5? Something like:
exit 0 if host.state != 3 or host.state != 5
Or there is another way to decide when to trigger or pass?