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

Commit 978c818

Browse files
committed
fix the issue of pausing sandbox
Signed-off-by: fupan <lifupan@gmail.com>
1 parent f65fa51 commit 978c818

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

daemon/pod/decommission.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,17 @@ func (p *XPod) UnPause() error {
146146

147147
err := p.protectedSandboxOperation(
148148
func(sb vc.VCSandbox) error {
149-
return sb.Pause()
149+
var err error
150+
defer func() {
151+
if err == nil {
152+
go p.waitVMStop()
153+
}
154+
}()
155+
err = sb.Resume()
156+
if err != nil {
157+
return err
158+
}
159+
return nil
150160
},
151161
time.Second*5,
152162
"resume pod")

0 commit comments

Comments
 (0)