Skip to content

Commit 80df074

Browse files
committed
<fix>[vm]: add Destroying->Stopped state transition
When MN restarts during a destroy operation, the hypervisor may report the VM as Stopped. Without this transition, the state machine throws an exception and the VM stays stuck in Destroying state forever. Resolves: ZSTAC-80620 Change-Id: I037edba70d145a44a88ce0d3573089182fedb162
1 parent 1d41921 commit 80df074

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

header/src/main/java/org/zstack/header/vm/VmInstanceState.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public enum VmInstanceState {
168168
new Transaction(VmInstanceStateEvent.destroyed, VmInstanceState.Destroyed),
169169
new Transaction(VmInstanceStateEvent.destroying, VmInstanceState.Destroying),
170170
new Transaction(VmInstanceStateEvent.running, VmInstanceState.Running),
171+
new Transaction(VmInstanceStateEvent.stopped, VmInstanceState.Stopped),
171172
new Transaction(VmInstanceStateEvent.expunging, VmInstanceState.Expunging)
172173
);
173174
Destroyed.transactions(

0 commit comments

Comments
 (0)