1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-25 23:21:29 +03:00

bug #2657: fix VMM driver to send one action per host

This commit is contained in:
Javi Fontan 2014-01-20 16:56:42 +01:00
parent b4e5217589
commit 0eb00fc502

View File

@ -218,7 +218,7 @@ private
def delete_running_action(action_id)
action=@action_running[action_id]
if action
@hosts.delete(action[:args][HOST_ARG])
@hosts.delete(action[:host])
@action_running.delete(action_id)
end
end
@ -226,14 +226,28 @@ private
def get_first_runable
action_index=nil
@action_queue.each_with_index do |action, index|
if action[:args][HOST_ARG]
if !@hosts.include?(action[:args][HOST_ARG])
if !action.keys.include?(:host)
if action[:args].length == 2
begin
xml=decode(action[:args].last)
host=xml.elements['HOST']
action[:host]=host.text if host
rescue
action[:host]=nil
end
else
action[:host]=nil
end
end
if action.keys.include?(:host) && action[:host]
if !@hosts.include?(action[:host])
action_index=index
break
end
else
action_index=index
break
action_index=index
break
end
end
@ -250,7 +264,7 @@ private
end
if action
@hosts << action[:args][HOST_ARG] if action[:args][HOST_ARG]
@hosts << action[:host] if action[:host]
@action_queue.delete_at(action_index)
end