mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-9831: Previous pod_id still remains in the vm_instance table after
VM migration with migrateVirtualMachineWithVolume
This commit is contained in:
parent
9cc3ae8a94
commit
3564d30233
@ -2287,8 +2287,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
||||
work.setResourceId(destHostId);
|
||||
work = _workDao.persist(work);
|
||||
|
||||
|
||||
// Put the vm in migrating state.
|
||||
vm.setLastHostId(srcHostId);
|
||||
vm.setPodIdToDeployIn(destHost.getPodId());
|
||||
moveVmToMigratingState(vm, destHostId, work);
|
||||
|
||||
boolean migrated = false;
|
||||
@ -2365,6 +2367,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
|
||||
"Migrate Command failed. Please check logs.");
|
||||
try {
|
||||
_agentMgr.send(destHostId, new Commands(cleanup(vm.getInstanceName())), null);
|
||||
vm.setPodIdToDeployIn(srcHost.getPodId());
|
||||
stateTransitTo(vm, Event.OperationFailed, srcHostId);
|
||||
} catch (final AgentUnavailableException e) {
|
||||
s_logger.warn("Looks like the destination Host is unavailable for cleanup.", e);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user