[one-users] Host hooks aren't triggered

Zaina AFOULKI zaina.afoulki at ensi-bourges.fr
Fri Apr 1 00:57:57 PDT 2011


 Hi,

 I checked the ruby script that's called and it seems that the array 
 containing the list of VMs is empty
 vm_ids_array = 
 vms.retrieve_elements("/VM_POOL/VM[STATE=3]/HISTORY[HOSTNAME=\"#{host_name}\"]/../ID")

 I tried printing something to a tmp file to make sure that the script 
 gets the right host id.
 my_file = File.new("/tmp/remove_me.txt", "w")
 my_file.puts "OpenNebula host has failed #{ARGV[0]}"

 The hostname and host_id are correctly detected by the script.

 Thank you for any hints on how to fix this,

 --
 Zaina

 On Thu, 31 Mar 2011 16:36:22 +0200, Zaina AFOULKI wrote:
> I just checked back the oned.log and it seems that the hook is 
> executed
> [HKM][D]: Message received: EXECUTE SUCCESS 31 disable
>
> However the VMs aren't re-submitted as expected ?
>
> Thanks,
> --
> Zaina
>
> On Thu, 31 Mar 2011 16:20:27 +0200, Zaina AFOULKI wrote:
>> Hi,
>>
>> I'm having some trouble getting the HOST_HOOKS to work:
>> I added this to the configuration file and restarted oned.
>>
>> HOST_HOOK = [
>>     name      = "disable",
>>     on        = "DISABLE",
>>     command   = "host_error.rb",
>>     arguments = "$HID -r y",
>>     remote    = "no" ]
>>
>> However when I disable a host using "onehost disable" the VMs aren't
>> re-submitted.
>> The oned.log doesn't indicate that the hook has been triggered.
>>
>> I'm using OpenNebula 2.2 and the script host_error.rb is indeed
>> located in my $ONE_LOCATION/share/hooks/
>>
>> What am I doing wrong? Thanks



More information about the Users mailing list