Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2794 from amshinde/remove-workaround-sharedpid
Browse files Browse the repository at this point in the history
shimv2 : Remove workaround for sharedPidNs
  • Loading branch information
amshinde authored Jul 6, 2020
2 parents 262776a + e0dc806 commit a885b1b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
8 changes: 0 additions & 8 deletions containerd-shim-v2/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ func loadSpec(r *taskAPI.CreateTaskRequest) (*specs.Spec, string, error) {
return nil, "", err
}

// Todo:
// Since there is a bug in kata for sharedPidNs, here to
// remove the pidns to disable the sharePidNs temporarily,
// once kata fixed this issue, we can remove this line.
// For the bug, please see:
// https://github.com/kata-containers/runtime/issues/930
removeNamespace(&ociSpec, specs.PIDNamespace)

return &ociSpec, bundlePath, nil
}

Expand Down
10 changes: 0 additions & 10 deletions containerd-shim-v2/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
vc "github.com/kata-containers/runtime/virtcontainers"
"github.com/kata-containers/runtime/virtcontainers/pkg/compatoci"
"github.com/kata-containers/runtime/virtcontainers/pkg/oci"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -124,12 +123,3 @@ func noNeedForOutput(detach bool, tty bool) bool {

return true
}

func removeNamespace(s *specs.Spec, nsType specs.LinuxNamespaceType) {
for i, n := range s.Linux.Namespaces {
if n.Type == nsType {
s.Linux.Namespaces = append(s.Linux.Namespaces[:i], s.Linux.Namespaces[i+1:]...)
return
}
}
}

0 comments on commit a885b1b

Please sign in to comment.