1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Merge branch 'bug-3768'

This commit is contained in:
Javi Fontan 2015-06-04 15:44:39 -04:00
commit 43962031df
12 changed files with 58 additions and 1 deletions

View File

@ -1018,6 +1018,7 @@ TM_SHARED_FILES="src/tm_mad/shared/clone \
src/tm_mad/shared/context \
src/tm_mad/shared/premigrate \
src/tm_mad/shared/postmigrate \
src/tm_mad/shared/failmigrate \
src/tm_mad/shared/mvds \
src/tm_mad/shared/cpds"
@ -1028,6 +1029,7 @@ TM_FS_LVM_FILES="src/tm_mad/fs_lvm/clone \
src/tm_mad/fs_lvm/cpds \
src/tm_mad/fs_lvm/premigrate \
src/tm_mad/fs_lvm/postmigrate \
src/tm_mad/fs_lvm/failmigrate \
src/tm_mad/fs_lvm/delete"
TM_QCOW2_FILES="src/tm_mad/qcow2/clone \
@ -1039,6 +1041,7 @@ TM_QCOW2_FILES="src/tm_mad/qcow2/clone \
src/tm_mad/qcow2/context \
src/tm_mad/qcow2/premigrate \
src/tm_mad/qcow2/postmigrate \
src/tm_mad/qcow2/failmigrate \
src/tm_mad/qcow2/mvds \
src/tm_mad/qcow2/cpds"
@ -1051,6 +1054,7 @@ TM_SSH_FILES="src/tm_mad/ssh/clone \
src/tm_mad/ssh/context \
src/tm_mad/ssh/premigrate \
src/tm_mad/ssh/postmigrate \
src/tm_mad/ssh/failmigrate \
src/tm_mad/ssh/mvds \
src/tm_mad/ssh/cpds"
@ -1063,6 +1067,7 @@ TM_DUMMY_FILES="src/tm_mad/dummy/clone \
src/tm_mad/dummy/context \
src/tm_mad/dummy/premigrate \
src/tm_mad/dummy/postmigrate \
src/tm_mad/dummy/failmigrate \
src/tm_mad/dummy/mvds \
src/tm_mad/dummy/cpds"
@ -1076,6 +1081,7 @@ TM_VMFS_FILES="src/tm_mad/vmfs/clone \
src/tm_mad/vmfs/mvds \
src/tm_mad/vmfs/cpds \
src/tm_mad/vmfs/postmigrate \
src/tm_mad/vmfs/failmigrate \
src/tm_mad/vmfs/premigrate"
TM_LVM_FILES="src/tm_mad/lvm/clone \
@ -1085,6 +1091,7 @@ TM_LVM_FILES="src/tm_mad/lvm/clone \
src/tm_mad/lvm/cpds \
src/tm_mad/lvm/premigrate \
src/tm_mad/lvm/postmigrate \
src/tm_mad/lvm/failmigrate \
src/tm_mad/lvm/delete"
TM_CEPH_FILES="src/tm_mad/ceph/clone \
@ -1094,6 +1101,7 @@ TM_CEPH_FILES="src/tm_mad/ceph/clone \
src/tm_mad/ceph/cpds \
src/tm_mad/ceph/premigrate \
src/tm_mad/ceph/postmigrate \
src/tm_mad/ceph/failmigrate \
src/tm_mad/ceph/delete"
TM_DEV_FILES="src/tm_mad/dev/clone \
@ -1103,6 +1111,7 @@ TM_DEV_FILES="src/tm_mad/dev/clone \
src/tm_mad/dev/cpds \
src/tm_mad/dev/premigrate \
src/tm_mad/dev/postmigrate \
src/tm_mad/dev/failmigrate \
src/tm_mad/dev/delete"
#-------------------------------------------------------------------------------

1
src/tm_mad/ceph/failmigrate Symbolic link
View File

@ -0,0 +1 @@
../common/failmigrate

29
src/tm_mad/common/failmigrate Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
# -------------------------------------------------------------------------- #
# Copyright 2002-2015, OpenNebula Project (OpenNebula.org), C12G Labs #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
# not use this file except in compliance with the License. You may obtain #
# a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
#--------------------------------------------------------------------------- #
# FAILMIGRATE SOURCE DST remote_system_dir vmid dsid template
# - SOURCE is the host where the VM is running
# - DST is the host where the VM failed to be migrated
# - remote_system_dir is the path for the VM home in the system datastore
# - vmid is the id of the VM
# - dsid is the target datastore
# - template is the template of the VM in XML and base64 encoded
# To access the vm_template you can use the xpath.rb utility. Check the
# datastore drivers for an example.
exit 0

1
src/tm_mad/dev/failmigrate Symbolic link
View File

@ -0,0 +1 @@
../common/failmigrate

View File

@ -0,0 +1 @@
../common/failmigrate

View File

@ -0,0 +1 @@
../common/failmigrate

1
src/tm_mad/lvm/failmigrate Symbolic link
View File

@ -0,0 +1 @@
../common/failmigrate

View File

@ -0,0 +1 @@
../common/failmigrate

View File

@ -0,0 +1 @@
../common/failmigrate

1
src/tm_mad/ssh/failmigrate Symbolic link
View File

@ -0,0 +1 @@
../common/failmigrate

1
src/tm_mad/vmfs/failmigrate Symbolic link
View File

@ -0,0 +1 @@
../common/failmigrate

View File

@ -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