Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions cmd/containerd-shim-runhcs-v1/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,6 @@ The delete command will be executed in the container's bundle as its cwd.
}
}

// Determine if the config file was a POD and if so kill the whole POD.
if s, err := getSpecAnnotations(bundleFlag); err != nil {
if !os.IsNotExist(err) {
return err
}
} else {
if containerType := s["io.kubernetes.cri.container-type"]; containerType == "container" {
if sandboxID := s["io.kubernetes.cri.sandbox-id"]; sandboxID != "" {
if sys, _ := hcs.OpenComputeSystem(ctx, sandboxID); sys != nil {
if err := sys.Terminate(ctx); err != nil {
fmt.Fprintf(os.Stderr, "failed to terminate '%s': %v", idFlag, err)
} else if err := sys.Wait(); err != nil {
fmt.Fprintf(os.Stderr, "failed to wait for '%s' to terminate: %v", idFlag, err)
}
sys.Close()
}
}
}
}

// Remove the bundle on disk
if err := os.RemoveAll(bundleFlag); err != nil && !os.IsNotExist(err) {
return err
}

if data, err := proto.Marshal(&task.DeleteResponse{
ExitedAt: time.Now(),
ExitStatus: 255,
Expand Down