mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #2657: fix VMM driver to send one action per host
(cherry picked from commit 0eb00fc502cc0810a396c79440e235abed990573)
This commit is contained in:
parent
a64e27c65b
commit
09c504222e
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user