Hi Zaina, Could you please print out also the content of "vm_ids_array"? I am afraid the xpath expression may not be doing its job.
Regards, -Tino -- Constantino Vázquez Blanco, MSc OpenNebula Major Contributor www.OpenNebula.org | @tinova79 On Fri, Apr 1, 2011 at 8:57 AM, Zaina AFOULKI <[email protected]> wrote: > 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 > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > _______________________________________________ Users mailing list [email protected] http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
