@@ -401,36+402,58 @@ static int migration_rx_fun(int argc, char *argv[])
// Here Stage 1, 2 and 3 have been performed.
// Hence complete the migration
+ // Copy the reference to the vm (if SRC crashes now, do_migration will free ms)
+ // This is clearly ugly but I (Adrien) need more time to do something cleaner (actually we should copy the whole ms structure at the begining and free it at the end of each function)
msg_error_t ret = MSG_task_send(task, ms->mbox_ctl);
// xbt_assert(ret == MSG_OK);
if(ret == MSG_HOST_FAILURE){
- // The SRC has crashed, this is not a problem has the VM has been correctly migrated on the DST node
+ // The DST has crashed, this is a problem has the VM since we are not sure whether SRC is considering that the VM has been correctly migrated on the DST node
+ // TODO What does it mean ? What should we do ?
MSG_task_destroy(task);
- }
+ } else if(ret == MSG_TRANSFER_FAILURE){
+ // The SRC has crashed, this is not a problem has the VM has been correctly migrated on the DST node