Comments (5)
I tried reproducing it using a Podman container created with podman run --privileged -v /root:/root --rm -ti fedora:39 bash
but in both cases the inner container does not create a cgroup.
how have you created the outer Docker container?
Can you please verify the cgroup of the container process cat /proc/$PID_CGROUP/cgroup
from the host in both cases?
from crun.
I tried reproducing it using a Podman container created with
podman run --privileged -v /root:/root --rm -ti fedora:39 bash
but in both cases the inner container does not create a cgroup.
EDIT: I was looking at the wrong thing.
They both create a cgroup, but I see the same configuration:
# cat /sys/fs/cgroup/devices/machine.slice/libpod-bcf881874d62ce2cf2226eb8598e0a1dd2bc4d1ea96c9fa9e577872720aca34c.scope/container/runc-container/devices.list
b *:* m
c *:* m
c 1:3 rwm
c 1:5 rwm
c 1:7 rwm
c 1:8 rwm
c 1:9 rwm
c 5:0 rwm
c 5:2 rwm
c 10:200 rwm
c 136:* rwm
# cat /sys/fs/cgroup/devices/machine.slice/libpod-bcf881874d62ce2cf2226eb8598e0a1dd2bc4d1ea96c9fa9e577872720aca34c.scope/container/crun-container/devices.list
c *:* m
b *:* m
c 1:3 rwm
c 1:8 rwm
c 1:7 rwm
c 5:0 rwm
c 1:5 rwm
c 1:9 rwm
c 5:1 rwm
c 136:* rwm
c 5:2 rwm
from crun.
Hi @giuseppe, thanks for your reply.
The outer container is created with a command like
> docker run --rm -it -v $(pwd):/oci-bundle --privileged fedora:39 bash
The Docker config I'm running on my laptop is
> docker info
Client:
Version: 24.0.7-ce
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: 0.11.2
Path: /usr/lib/docker/cli-plugins/docker-buildx
Server:
Containers: 6
Running: 1
Paused: 0
Stopped: 5
Images: 274
Server Version: 24.0.7-ce
Storage Driver: btrfs
Btrfs:
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 oci runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8e4b0bde866788eec76735cc77c4720144248fb7
runc version: v1.1.10-0-g18a0cb0f32bc
init version:
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 5.14.21-150400.24.81-default
Operating System: openSUSE Leap 15.4
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 31.06GiB
Name: carbon
ID: 7IY2:7RUT:5VJZ:QQKN:S75T:CZBI:VM4J:UHRR:JT5K:75EH:FCU5:IKA7
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: madeeks
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
I thought the behavior could be related to the cgroup driver, but I obtained the same results (i.e. different device allowed lists) when using runc/crun on a Ubuntu 20.04 VM using Docker with a cgroupfs
driver.
I can also reproduce the results with Podman using both systemd
and cgroupfs
arguments to --cgroup-manager
(in this case I ran rootful Podman since the option is not supported with rootless Podman and cgroups v1).
I'll keep digging in how my container engines are setting up cgroups in the outer containers.
from crun.
I thought the behavior could be related to the cgroup driver, but I obtained the same results (i.e. different device allowed lists) when using runc/crun on a Ubuntu 20.04 VM using Docker with a
cgroupfs
driver.
do you get the same results with runc and crun?
from crun.
Apologies for the ambiguous wording.
I get the same results on my OpenSUSE laptop and the Ubuntu 20.04 VM.
That is, on both systems the device cgroups produced by runc and crun are different (when the runtimes are started inside a Docker container).
The Docker cgroup driver is different between the 2 platforms: systemd
on the OpenSUSE laptop, cgroupfs
on the Ubuntu VM.
If I create the outside container with Podman, I still obtain crun/runc device cgroup differences.
This happens even when using different values for Podman's --cgroup-manager
option.
from crun.
Related Issues (20)
- Does crun really need CAP_SYS_RESOURCE HOT 1
- Device permissions are changed when using a userns (rootful container) HOT 4
- Upgrade to 1.14 breaks some docker container (os: debian) HOT 11
- crun cannot make
- Segfault with run --systemd-cgroup but no linux.resources in config.json (v1.11+) HOT 2
- apt repository for current versions HOT 1
- crun verify the cgroup file system type even when invoked with `--cgroups=disabled`
- crun: bpf create ``: Invalid argument HOT 2
- #21520 crun not working with pterodactyl wings HOT 6
- Read-only file volumes fail on fedora 39 with docker HOT 5
- How to verify downloaded binaries? HOT 2
- Release v1.14.4 HOT 2
- unrecognized option '--keep' when using crun for building docker images HOT 2
- Example Config HOT 1
- Crun not starting in amd64/x86_64 docker container on Apple Silicon HOT 3
- crun 1.14.4: `Error: OCI runtime error: crun: Error relocating /usr/bin/crun: statx: symbol not found` HOT 3
- BPF create error when use debian bullseye kernel >= 5.10.0-26-amd64 HOT 1
- Does not ignore SIGWINCH if no terminal is allocated
- container create failed: sd-bus call: Cannot set property CPUQuotaPeriodUSec, or unknown propert HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crun.