Hooks aren't triguered

Hi,

I’d want to create a hook (ONE 4.6) which lunchs a ruby script in case something is happened with a VM (for whatever reason it enters in a STATE different of RUNNING). The problem is that it seems that the hook is not triguered.

My hook is:

VM_HOOK = [
name = “hook_vm”,
on = “DONE”,
command = “script.sh”,
arguments = “$ID”,
remote = “no” ]

I defined it in the /etc/one/oned.conf of a local zone within a federation. Then, I restarted “one” in that zone with oneadmin and I stopped a VM of the zone. In addition, the “script.sh” file is stored in /var/lib/one/remotes/hooks, and have execution privileges. I don’t see nothing which can tell me that the hook was triguered.

Thank you very much

Best regards

Hi

on = “DONE” is for that state DONE (and no STOPPED), currently is not
straight forward to define hooks with negative clauses; (state != RUNNING).
You may however define a hook on all interesting states…