Comments (6)
I think the issue is that you are setting a systemd cgroup in the OCI configuration file but didn't use --systemd-cgroup
to the OCI runtime.
Could you run $OCI_RUNTIME --systemd-cgroup run -d -b ....
and compare them again?
from crun.
Basically you are correct that with --systemd-cgroup crun/runc hierarchies identical:
-.slice
└─system.slice (#43)
├─runc-fcfcc473-64a0-41bc-bb61-8ca3801c7e0f.scope … (#3141)
│ → trusted.delegate: 1
│ → trusted.invocation_id: 96501da102af47ffae740d837a05726f
│ └─ 2727 python3 -u main.py
-.slice
└─system.slice (#43)
├─crun-fcfcc473-64a0-41bc-bb61-8ca3801c7e0f.scope … (#2676)
│ → trusted.delegate: 1
│ → trusted.invocation_id: 8d2b9a3448774046bca968cca71c4d50
│ └─container (#2716)
│ └─ 2710 python3 -u main.py
Nevertheless I haven't found systemd cgroup in the OCI configuration file.
I think there is a difference in behavior between crun & runc for cases without --systemd-cgroup option. I suppose crun creates child cgroup inherited from the root, while runc from the parent cgroup. Example for crun/runc under systemd:
=>> crun
Control group /:
-.slice
├─fcfcc473-64a0-41bc-bb61-8ca3801c7e0f (#1812)
│ └─ 852 python3 -u main.py
=>> runc
Control group /:
-.slice
└─system.slice (#43)
├─system-aos\x2dservice.slice (#1754)
│ → trusted.invocation_id: fbd62be6c5534072bc6193702d1bdb25
│ ├─fcfcc473-64a0-41bc-bb61-8ca3801c7e0f (#2186)
│ │ └─ 859 python3 -u main.py
│ └─[email protected] (#1783)
│ → trusted.invocation_id: a94e0068c56e44b4ba481b7a709a797a
=>> cgroup of systemd service
root@node0:~# systemctl status [email protected]
● [email protected] - AOS Service
Process: 852 ExecStart=/usr/bin/runc run -d --pid-file /run/aos/runtime/fcfcc473-64a0-41bc-bb61-8ca3801c7e0f/.pid -b /run/aos/runtime/fcfcc473-64a0-41bc-bb61-8ca3801c7e0f fcfcc473-64a0-41bc-bb61-8ca3801c7e0f (code=exited, status=0/SUCCESS)
CGroup: /system.slice/system-aos\x2dservice.slice/[email protected]
‣ 859 python3 -u main.py
Attaching container configuration:
cat-config.json
I can also share strace output for both cases if required.
from crun.
if you don't specify the --systemd-cgroup
option, then you must specify the cgroup path as it is on the cgroup file system (e.g. foo/bar
will become /sys/fs/cgroup/foo/bar
).
from crun.
And in case when both parameters not specified then behavior is implementation defined. ie it's ok that crun/runc create different hierarchies, right?
from crun.
yes, it is implementation specific (although I remember we end up doing a similar thing)
from crun.
good to know, that's what I needed to clarify, thank you. Closing the issue.
from crun.
Related Issues (20)
- 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
- Discrepancy between crun and runc when disallowing access by default to devices with cgroups v1 HOT 5
- Does not ignore SIGWINCH if no terminal is allocated
- container create failed: sd-bus call: Cannot set property CPUQuotaPeriodUSec, or unknown propert HOT 8
- Compilation error with clang++ 17 HOT 3
- Missing libsystemd headers on Alpine Linux v3.19 HOT 2
- Version 1.14.5 HOT 1
- [packit] Propose downstream failed for release 1.15 HOT 2
- Container creation fails with read-only bind mount HOT 3
- what is the purpose and future of crun-wasm - asking for (a friend) Debian packaging :) ? HOT 5
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.