mirror of https://github.com/apache/cloudstack.git
fix migration npe when recovering
This commit is contained in:
parent
e8f317243f
commit
db5afa4994
|
|
@ -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…
Reference in New Issue