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

M #-: Fix DS id while resuming undeployed VM (#837)

This commit is contained in:
Pavel Czerný 2021-02-19 09:37:32 +01:00 committed by GitHub
parent e8a8daed5a
commit 05e235cde3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -835,7 +835,10 @@ void VirtualMachineDeploy::request_execute(xmlrpc_c::paramList const& paramList,
vm->get_action() == VMActions::UNDEPLOY_ACTION ||
vm->get_action() == VMActions::UNDEPLOY_HARD_ACTION))
{
ds_id = vm->get_ds_id();
if (ds_id == -1)
{
ds_id = vm->get_ds_id();
}
check_nic_auto = false;
}

View File

@ -701,7 +701,7 @@ void TransferManager::trigger_prolog_resume(VirtualMachine * vm)
VirtualMachineDisks& disks = vm->get_disks();
if (!vm->hasHistory())
if (!vm->hasHistory() || !vm->hasPreviousHistory())
{
goto error_history;
}
@ -756,7 +756,7 @@ void TransferManager::trigger_prolog_resume(VirtualMachine * vm)
<< tm_mad_system
<< " " << tm_mad << " "
<< nd.get_nebula_hostname() << ":"
<< vm->get_system_dir() << "/disk." << disk_id << " "
<< vm->get_previous_system_dir() << "/disk." << disk_id << " "
<< vm->get_hostname() << ":"
<< vm->get_system_dir() << "/disk." << disk_id << " "
<< vm->get_oid() << " "
@ -766,7 +766,7 @@ void TransferManager::trigger_prolog_resume(VirtualMachine * vm)
//MV tm_mad fe:system_dir host:remote_system_dir vmid dsid(system)
xfr << "MV "
<< vm_tm_mad << " "
<< nd.get_nebula_hostname() << ":"<< vm->get_system_dir() << " "
<< nd.get_nebula_hostname() << ":"<< vm->get_previous_system_dir() << " "
<< vm->get_hostname() << ":" << vm->get_system_dir()<< " "
<< vm->get_oid() << " "
<< vm->get_ds_id() << endl;