-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Initial implementation of resource-control via systemd and dbus #120
Conversation
fe63a59
to
8aaee1c
Compare
a7c60f6
to
8810669
Compare
@nimrodshn Is there anything I can do to help? |
@utam0k Sorry I was busy with other projects 😢 I will try and get some work on this soon.. |
@nimrodshn I understand. You can do it at your own pace. I was a little worried because you've been contributing to youki quite a bit. |
@utam0k Sorry I was busy with life 😅 . I will try to advance this asap. Dont worry - I'm here 😸
@Furisto suggested I make the resource control part modular (similar to how we provide |
@nimrodshn My idea was that the dbus client should not know anything about resources or controllers. The responsibility of the dbus client is to communicate with systemd and nothing else. The responsibility of the controllers is to translate the resource restrictions described in the spec to systemd properties. You do not need to implement it exactly like this though, if you think you have a better idea, go for it. |
37fabbe
to
5154b60
Compare
5154b60
to
ec0a83b
Compare
@nimrodshn Can I support you in any way? |
@Furisto No I'm good thanks! I just came back to this 😄 |
ec0a83b
to
ca0128e
Compare
@nimrodshn Hi! Can I ask you to write out the remaining work? |
@utam0k Wrote the work to be done in the PRs description ⬆️ |
@nimrodshn Thanks! Let me know if you are busy or need any help. This isn't going to be included in the first release of youki, so taking it slow is fine. Please don't feel pressured. We need your help, I'll be waiting for you to come back ;) |
Thanks @utam0k currently finding it hard to work on open source 😿 as I'm in between jobs so taking it one step at a time 😸 |
Of course, there are times like that. No problem. I'm waiting for this PR to be open, so let me know when you have more time. If you'll have plans to resume trying this issue, please let me know. |
@Furisto @yihuaf |
@Furisto Thank you for accepting it. I have assigned you this issue. Can I leave it to you to decide how to proceed? |
@utam0k Sure |
We'll continue here. @nimrodshn Thanks a lot. |
What this does?
Adds easy API for interacting with systemd via dbus (namely creating units), using this we can apply resource control via systemd.
Please note: I try to align with runc's approach in this line of work to walk in the steps of giants.
TODO:
systemd
properties. (Traits and respective implementation).start_transient_unit_for_container
which eventually applies the properties to the newly created unit associated with the container (the lastfor
loop doesn't compile in the current vesion 😢 ). The bindings generated to the dbus interfaces are used using the following command:> dbus-codegen-rust -s -g -m None -d org.freedesktop.systemd1 -p /org/freedesktop/systemd1
(See https://github.com/diwic/dbus-rs)Related issue: #24
cc: @utam0k @Furisto