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

Commit 9021a93

Browse files
authored
Merge pull request #705 from teawater/removeFromSandbox
XPod: doStopPod: call removeFromSandbox with every p.containers
2 parents 58697a4 + f39876a commit 9021a93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

daemon/pod/decommission.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,13 @@ func (p *XPod) doStopPod(graceful int) error {
382382
return nil
383383
}
384384

385+
for cid, c := range p.containers {
386+
err = c.removeFromSandbox()
387+
if err != nil {
388+
c.Log(ERROR, "failed to remove %s from sandbox", cid)
389+
}
390+
}
391+
385392
p.Log(INFO, "stop container success, shutdown sandbox")
386393
result := p.sandbox.Shutdown()
387394
if result.IsSuccess() {

0 commit comments

Comments
 (0)