privileged container's disk attribute is ro
because the namespace of pause container
is added
#11270
Labels
ro
because the namespace of pause container
is added
#11270
Description
When I create the container, privileged is turned on, but since the pause container
sysfs
isro
, my privileged container is alsoro
Steps to reproduce the issue
pod.json
container.json
In container
Examining a privileged container run through Kubernetes, we see this in the OCI bundle config.json:
This is so because pod's
config.json
:I've found this to be because the pause container is configured by default:
containerd/pkg/oci/mounts.go
Line 25 in 97119cc
containerd/pkg/oci/mounts.go
Lines 57 to 62 in 97119cc
I found a workaround when
RunPodSandbox
:containerd/internal/cri/server/podsandbox/sandbox_run.go
Lines 131 to 138 in 2ab62ac
I'm implementing the ability to pass the mount property, similar to --mount for
ctr
andnerdctl
, I wanted to implement it and then mention it, but I can provide a way to circumvent it first.Describe the results you received and expected
Hopefully, in the case of non-bind, the
sysfs
of the privileged container isrw
What version of containerd are you using?
containerd github.com/containerd/containerd/v2 v2.0.1 88aa2f5
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: