[one-users] Multiple HOST_HOOKs in oned.conf ?

Dmitri Chebotarov dchebota at gmu.edu
Sun Nov 23 07:13:48 PST 2014


Carlos,
thank you for for the info.

I’ve noticed that HOST HOOK on ERROR executes every time, for as long as HOST is not reachable.
This somewhat I didn’t expect and thought HOOK would execute once per status change (i.e. once when HOST goes ON to ERROR).
My plan was to use ERROR HOOK to reset host’s power (via IPMI), but since it takes more that a minute for host to boot it would send the host into endless power cycle…
 The script will need to implement some kind of tracking/cookie, so it doesn’t send power reset more then once.

--
Thank you,

Dmitri Chebotarov
VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers & Messaging
223 Aquia Building, Ffx, MSN: 1B5
Phone: (703) 993-6175 | Fax: (703) 993-3404

On Nov 21, 2014, at 10:23 , Carlos Martín Sánchez <cmartin at opennebula.org<mailto:cmartin at opennebula.org>> wrote:

Hi,

On Mon, Nov 17, 2014 at 4:41 PM, Dmitri Chebotarov <dchebota at gmu.edu<mailto:dchebota at gmu.edu>> wrote:
Hi,

Does oned.conf support multiple HOST_HOOK definitions?
If it does, are hooks executed in the same order as listed in the oned.conf file?
Or do I need to modify ft/host_error.rb to include desired functionality?

I would like to add one more HOST_HOOK to reset power on HOST ERROR event, in addition to already defined ft/host_error.rb.

I'm running 4.8.0.


You can define several hooks, and they will be executed in the same order they are defined in oned.conf.
But, if I recall correctly, the hooks are launched asynchronously. If you need to wait for the first hook to finish before launching the second one, you can create a small wrapper script and launch both from there.

Regards
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org<http://www.opennebula.org/> | cmartin at opennebula.org<mailto:cmartin at opennebula.org> | @OpenNebula<http://twitter.com/opennebula><mailto:cmartin at opennebula.org>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20141123/361f4f0e/attachment.htm>


More information about the Users mailing list