mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix migration npe when recovering
This commit is contained in:
parent
ccc12793c6
commit
852cf0e6c7
@ -261,9 +261,11 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager, Clu
|
||||
|
||||
@Override
|
||||
public boolean scheduleMigration(final VMInstanceVO vm) {
|
||||
final HaWorkVO work = new HaWorkVO(vm.getId(), vm.getType(), WorkType.Migration, Step.Scheduled, vm.getHostId(), vm.getState(), 0, vm.getUpdated());
|
||||
_haDao.persist(work);
|
||||
wakeupWorkers();
|
||||
if (vm.getHostId() != null) {
|
||||
final HaWorkVO work = new HaWorkVO(vm.getId(), vm.getType(), WorkType.Migration, Step.Scheduled, vm.getHostId(), vm.getState(), 0, vm.getUpdated());
|
||||
_haDao.persist(work);
|
||||
wakeupWorkers();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user