« Previous | Next » 

Revision 4a402f74

ID4a402f74e1670dc642e2345901ded87b8bb144db
Parent 228d0df5
Child 7062e77d

Added by Anton Todorov almost 5 years ago

rework premigrate and postmigrate scripts

The change was inspired by the live-migrate scripts for SYSTEM_DS with `shared` TM_MAD

After some rework I've figured out that it could be made as some sort of generic one.

The proposed changes
  • tm_common.sh - new function migrate_other() receiving all arguments from the caller script
    The function parses the TEMPLATE blob and exposes BASH arrays:
    DISK_ID_ARRAY - array of all VM DISK_ID
    TM_MAD_ARRAY - array of TM_MADs for each DISK_ID
    CLONE_ARRAY - aray of all CLONE values for each DISK_ID
    The function exposes DISK_ID of the CONTEXT disk too as CONTEXT_DISK_ID
    The function check for extra argument to prevent recursion loops
    For each TM_MAD it it is not current one the corresponding script is called
    with same arguments but one additional - to mark that it is called not from
    in the SYSTEM_DS context
Usage:
migrate_common "$@"

The function is appended to the following TM_MADs:
ceph
fs_lvm
qcow2
shared
ssh

The General idea is to allow live-migration of VMs with mix of disks with any of the above TM_MADs (different datastores)

For example if we have VM with the following disks
disk.0 ceph
disk.1 ceph (context)
disk.2 - ceph
disk.3 - fs_lvm
disk.4 - qcow2

In the above scenario when live migration is issed the following scripts will be called

ceph/premigrate <args>
fs_lvm/premigrate <args> "ceph"
qcow2/premigrate <args> "ceph"

As most probably I am missing someting I am open for discussion :)

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences