launch_deferred_exec_process(ms->vm, received * xfer_cpu_overhead, 1);
@@ -390,31+399,60 @@ static int migration_rx_fun(int argc, char *argv[])
break;
}
+ // 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);
+ // xbt_assert(ret == MSG_OK);
+ if(ret == MSG_HOST_FAILURE){
+ // 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