Skip to content

Commit 434f8da

Browse files
committed
Remove the hacking way of blocking VM state transition introduced by individual VM snapshot orchestration flow
1 parent 58c26ee commit 434f8da

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,10 +1543,15 @@ private void setStateMachine() {
15431543

15441544
protected boolean stateTransitTo(VMInstanceVO vm, VirtualMachine.Event e, Long hostId, String reservationId) throws NoTransitionException {
15451545
// if there are active vm snapshots task, state change is not allowed
1546-
if (_vmSnapshotMgr.hasActiveVMSnapshotTasks(vm.getId())) {
1547-
s_logger.error("State transit with event: " + e + " failed due to: " + vm.getInstanceName() + " has active VM snapshots tasks");
1548-
return false;
1549-
}
1546+
1547+
// Disable this hacking thing, VM snapshot task need to be managed by its orchestartion flow istelf instead of
1548+
// hacking it here at general VM manager
1549+
/*
1550+
if (_vmSnapshotMgr.hasActiveVMSnapshotTasks(vm.getId())) {
1551+
s_logger.error("State transit with event: " + e + " failed due to: " + vm.getInstanceName() + " has active VM snapshots tasks");
1552+
return false;
1553+
}
1554+
*/
15501555
vm.setReservationId(reservationId);
15511556
return _stateMachine.transitTo(vm, e, new Pair<Long, Long>(vm.getHostId(), hostId), _vmDao);
15521557
}

0 commit comments

Comments
 (0)