mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
bug #3768: add tm/failmigrate call on error
This commit is contained in:
parent
71d4bdd0ec
commit
bdd231bf51
@ -478,9 +478,11 @@ class ExecDriver < VirtualMachineDriver
|
||||
action = VmmAction.new(self, id, :migrate, drv_message)
|
||||
pre = "PRE"
|
||||
post = "POST"
|
||||
failed = "FAIL"
|
||||
|
||||
pre << action.data[:tm_command] << " " << action.data[:vm]
|
||||
post << action.data[:tm_command] << " " << action.data[:vm]
|
||||
failed << action.data[:tm_command] << " " << action.data[:vm]
|
||||
|
||||
steps=[
|
||||
# Execute a pre-migrate TM setup
|
||||
@ -499,7 +501,15 @@ class ExecDriver < VirtualMachineDriver
|
||||
{
|
||||
:driver => :vmm,
|
||||
:action => :migrate,
|
||||
:parameters => [:deploy_id, :dest_host, :host]
|
||||
:parameters => [:deploy_id, :dest_host, :host],
|
||||
:fail_actions => [
|
||||
{
|
||||
:driver => :tm,
|
||||
:action => :tm_failmigrate,
|
||||
:parameters => failed.split,
|
||||
:no_fail => true
|
||||
}
|
||||
]
|
||||
},
|
||||
# Execute networking clean up operations
|
||||
# NOTE: VM is now in the new host. If we fail from now on, oned will
|
||||
|
Loading…
x
Reference in New Issue
Block a user