google / gvisor-containerd-shim

containerd shim for gVisor
https://gvisor.dev
Apache License 2.0
79 stars 28 forks source link

critest: runtime should support ContainerPID #26

Open zhuangqh opened 5 years ago

zhuangqh commented 5 years ago

Problem

• Failure in Spec Teardown (AfterEach) [6.301 seconds]
[k8s.io] Security Context
/root/go/src/github.com/kubernetes-sigs/cri-tools/pkg/framework/framework.go:72
  NamespaceOption
  /root/go/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/security_context.go:72
    runtime should support ContainerPID [AfterEach]
    /root/go/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/security_context.go:224

    Expected
        <string>: /pause
    to contain substring
        <string>: master process

    /root/go/src/github.com/kubernetes-sigs/cri-tools/pkg/validate/security_context.go:246

briefly describe what happens:

crictl runp xxx.json
{
...
  "linux": {
    "security_context": {
      "namespace_options": {
        "pid": "CONTAINER"
      }
    }
  }
}

crictl create & start
{
...
  "image": "nginx",
  "linux": {
    "security_context": {
      "namespace_options": {
        "pid": "CONTAINER"
      }
    }
  }
}

exec in container cat /proc/1/cmdline

got: /pause expected: 'master process'

Version

containerd 1.2 + containerd-shim-runsc-v1 runsc: commit: 0b768871