mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-02 01:16:27 +00:00
Merge pull request #338 from amshinde/remove-workaround-sharedpid
shimv2 : Remove workaround for sharedPidNs
This commit is contained in:
@@ -132,14 +132,6 @@ func loadSpec(r *taskAPI.CreateTaskRequest) (*specs.Spec, string, error) {
|
|||||||
return nil, "", err
|
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/kata-containers/src/runtime/issues/930
|
|
||||||
removeNamespace(&ociSpec, specs.PIDNamespace)
|
|
||||||
|
|
||||||
return &ociSpec, bundlePath, nil
|
return &ociSpec, bundlePath, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ import (
|
|||||||
vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers"
|
vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/compatoci"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/compatoci"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/oci"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/oci"
|
||||||
"github.com/opencontainers/runtime-spec/specs-go"
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -124,12 +123,3 @@ func noNeedForOutput(detach bool, tty bool) bool {
|
|||||||
|
|
||||||
return true
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user