mirror of https://github.com/apache/cloudstack.git
bug 12798: when VM is stopped, when sending command to storage pool, make sure last_host is tried first
This commit is contained in:
parent
bde008ed7e
commit
89d0e29797
|
|
@ -232,8 +232,12 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||
VMInstanceVO vm = _vmDao.findById(vol.getInstanceId());
|
||||
|
||||
long[] hostIdsToTryFirst = null;
|
||||
if (vm != null && vm.getHostId() != null) {
|
||||
hostIdsToTryFirst = new long[] { vm.getHostId() };
|
||||
if (vm != null) {
|
||||
if(vm.getHostId() != null) {
|
||||
hostIdsToTryFirst = new long[] { vm.getHostId() };
|
||||
} else if(vm.getLastHostId() != null) {
|
||||
hostIdsToTryFirst = new long[] { vm.getLastHostId() };
|
||||
}
|
||||
}
|
||||
|
||||
List<Long> hostIdsToAvoid = new ArrayList<Long>();
|
||||
|
|
|
|||
Loading…
Reference in New Issue