Comments (16)
@utam0k @tsturzl
I am planning to have a PR ready the day after tomorrow
from youki.
Sure, would be happy to help. How do you want to proceed @utam0k ? I thought about getting through the references and then attempting a spike of the cgroup v2 manager.
from youki.
@Furisto
I took a look at your commit. As a first step it was exactly what I imagined. I think it's a good policy.
Can I assign this problem to you?
If it looks like it needs to be handled by a variety of controllers, I think it would be a good idea to provide an example like in v1 to give others a chance to try.
from youki.
@Furisto
It is a very good idea as a first step. I think an eventual implementation like the crun about it would be nice.
https://github.com/containers/crun/blob/master/crun.1.md#cgroup-v2
I thought about getting through the references and then attempting a spike of the cgroup v2 manager.
I'd love to hear other people's opinions as well as mine, so please let me know what you think.
If you are interested, you can try to implement a cgroups v2 manager?
from youki.
Progress can be seen here: https://github.com/Furisto/youki/tree/cgroupv2. I am currently fleshing out the cgroups v2 manager and 1-2 subsystems.
from youki.
@utam0k
You can assign it to me. Yes, the idea is to do the first one or two myself and then the rest can be done by other people.
from youki.
@Furisto I assigned you. I look forward to your PR!
from youki.
@Furisto cc: @tsturzl
I decided to make cgroups v2 support a key feature for the first release of youki.
I'm looking forward to it.
from youki.
@Furisto Wow! I am amazed at how fast you work.
from youki.
@Furisto
Thanks for your hard work in supporting v2. It was very nice work!
BTW, I'd like to talk to you about how to proceed with v2 support for each subsystem.
I think it is better to proceed with the project in the same way as utam0k#9.
What do you think about it?
from youki.
@utam0k
I think it is a good idea. I am investigating one open issue, once that is solved we can split up the work for the different subsystems. The issue is that the cgroup manager gets the pid of youki and not of the container process. If i do this
sudo docker run -d --rm -m 30m --runtime youki progrium/stress --cpu 2
then the process tree looks like this:
root 13519 1 0 00:19 ? 00:00:00 /usr/bin/containerd-shim-runc-v2 -namespace moby -id 509e2e3131d50c63d599a
root 13530 13519 0 00:19 pts/24 00:00:00 \_ /home/furisto/Projects/Existing/youki-me/target/x86_64-unknown-linux-gnu/d
root 13531 13530 0 00:19 pts/24 00:00:00 \_ /usr/bin/stress --verbose --cpu 2
root 13538 13531 99 00:19 pts/24 00:00:03 \_ /usr/bin/stress --verbose --cpu 2
root 13539 13531 99 00:19 pts/24 00:00:03 \_ /usr/bin/stress --verbose --cpu 2
The cgroup manager gets pid 13530, not 13531. We also seem to call apply too late during create, because 13538, 13539 and 13531 end up in the containerd.slice not in the cgroup created by youki. That must mean that when these processes are forked their parent is not yet in the correct cgroup.
from youki.
@Furisto
Maybe applying cmanager in fork_init()
instead of fork_first()
will fix it.
https://github.com/utam0k/youki/blob/52b9a15d5168b590770d5aa79f9cebdee04d7604/src/process/fork.rs#L56
The flow in this image is old, and some of it may be wrong, but it's about right.
from youki.
@Furisto Hi! I think the problem mentioned above was solved by #69. So Can I create a tracking issue to implement some subsystems for cgv2?
from youki.
@utam0k Yes, you can!
from youki.
I created #78.
Let's continue with cgv2 support in this issue!
from youki.
Special thanks to @Furisto
from youki.
Related Issues (20)
- Wrong directory when using a tenant container and w/ a mount namespace HOT 2
- `runc` differences given the same `config.json` HOT 4
- Packaging youki for openSUSE: How to disable the tests that need dbus? HOT 8
- Unexpected `chdir` invoked on container `init` and `start` HOT 9
- add build_with_spec(spec) HOT 8
- Add CPU affinity to executed processes HOT 5
- Associated type defaults are not stable, broken since 0.3.2 HOT 2
- Move youki_version macro define in use before
- change `mount.rs` find_parent_mount from pub to private HOT 4
- Options to pass env vars from OCI Spec to WASI Context HOT 6
- Make our roadmap public HOT 3
- bug: unreliable behavior in stress tests `failed to delete container` HOT 11
- [RFC] Consider Alternate CI for running Podman tests HOT 6
- Support Landlock
- oci-validation-go is unstable in our CI HOT 2
- Update nc from 0.8.23 to 0.9.1 HOT 2
- [BUG] Rust 1.80 breaks build HOT 2
- Publish release with 1.80 support HOT 1
- [Bug]: `vagrant up` doesn't work HOT 2
- Create standard environment setups for testing
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 youki.