Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 73bcb9e

Browse files
committed
fix the issue of disassociating sandbox
When do sandbox release action, it will stop the sandbox monitor, once received this monitor stop notification, it shouldn't do the pod clean action. Signed-off-by: fupan <[email protected]>
1 parent f20ea2c commit 73bcb9e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

daemon/pod/decommission.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,14 @@ func (p *XPod) waitVMStop() {
535535
if err != nil {
536536
p.Log(INFO, "cannot monitor the vm, %v", err)
537537
} else {
538-
_ = <-monitor
539-
p.Log(INFO, "got vm exit event")
538+
ret, ok := <-monitor
539+
/*get the sandbox released notification, thus it doesn't need to do cleanup*/
540+
if ! ok {
541+
p.Log(INFO, "got vm disassociate event")
542+
return
543+
}
544+
p.Log(INFO, "got vm exit event: %v", ret)
540545
}
541-
542546
p.cleanup()
543547
}
544548

0 commit comments

Comments
 (0)