Skip to content
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

[Tracking Issue] Support for cgroups v1 #9

Closed
11 tasks done
utam0k opened this issue May 17, 2021 · 52 comments
Closed
11 tasks done

[Tracking Issue] Support for cgroups v1 #9

utam0k opened this issue May 17, 2021 · 52 comments
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@utam0k
Copy link
Member

utam0k commented May 17, 2021

This issue is for tracking the implementation of cgroups.
Since devices of cgoups has already been implemented, you can implement it while referring to it.
If you are interested, you can comment on this issue and I will assign it to you.

Goal

Each of them will be targeted to pass integration tests. If possible, it is good to have unit tests as well.
It would be helpful to have a look at the GitHub Actions file to see how to run the integration tests.

Reference

@utam0k utam0k added the good first issue Good for newcomers label May 17, 2021
@sensaiankit
Copy link

I would like to work on this issue, but as I am a beginner i didn't understood the issue so can you please guide me

@kmpzr
Copy link
Contributor

kmpzr commented May 17, 2021

Hi @utam0k, thanks for your work so far! I'm looking for some tasks to hone my Rust skills and I guess this issue looks like a perfect candidate, I'm interested in the assignment. I'll go through the cgroups to check the details, but I guess it would be beneficial to all if we could somehow have a in depth implementation discussion to better align with your vision of the project. You can DM me on Twitter: @0xdco.

@utam0k
Copy link
Member Author

utam0k commented May 17, 2021

@sensaiankit How about this issue(utam0k#8), which is more recommended for beginners?
For example, src/namespaces already has one sample test, so you can use that as an example to increase.

@utam0k
Copy link
Member Author

utam0k commented May 17, 2021

@0xdco Thanks! I'd like to assign you to one of cgroup's controller.
Which controller are you most interested in?
Or do you want to modify or refactor the architecture? If you have any advice on architecture or code I'd love to hear it :)

@sensaiankit
Copy link

@sensaiankit How about this issue(#8), which is more recommended for beginners?
For example, src/namespaces already has one sample test, so you can use that as an example to increase.

Okay cool looking forward for that issue. I still would like to get guidance from you, would you mind connecting somewhere like either twitter or discord

@utam0k
Copy link
Member Author

utam0k commented May 17, 2021

@sensaiankit Of course! If you want my guidance you can contact me on Twitter DM. I will do my best to accommodate you as my time permits. Sorry if it takes me a while to reply.

@sensaiankit
Copy link

@sensaiankit Of course! If you want my guidance you can contact me on Twitter DM. I will do my best to accommodate you as my time permits. Sorry if it takes me a while to reply.

I saw your twitter account but i cant really do a dm will you please open it ?

@utam0k
Copy link
Member Author

utam0k commented May 17, 2021

@sensaiankit Of course! If you want my guidance you can contact me on Twitter DM. I will do my best to accommodate you as my time permits. Sorry if it takes me a while to reply.

I saw your twitter account but i cant really do a dm will you please open it ?

Sorry... I opened it.

@kmpzr
Copy link
Contributor

kmpzr commented May 17, 2021

@0xdco Thanks! I'd like to assign you to one of cgroup's controller.
Which controller are you most interested in?
Or do you want to modify or refactor the architecture? If you have any advice on architecture or code I'd love to hear it :)

You can assign me to whichever controller you think is a good easy / introductory point to the project as I'm still reading the code and the documentation(s) to get started. I will be able to start tackling it during the weekend. Depending on how successful I am in my endeavor, I might take over other available controllers to write as well. I have no plans to modify or refactor the architecture but let's see after the implementation if there are opportunities to do some cleanups.
I'm also taking a look in the railcar implementation in the hope it gives me some insights on how to implement it on youki.
Furthermore, it would be awesome if you could point me out to any resource or workflow you used to test / check the changes (other than the already stated on the README) as I'm not quite familiar with runc nor runtime-spec (taking a look at it already).

@utam0k
Copy link
Member Author

utam0k commented May 18, 2021

@0xdco
I assigned you to the pids of the controller. I'm thinking that it's probably not that difficult.
How about using this test provided by the opencontainers to guarantee operation? (You can test this by setting an environment variable called RUNTIME in the youki exec file.)
https://github.com/opencontainers/runtime-tools/tree/master/validation/linux_cgroups_pids
runtime-spec's document about groups is here.
https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#control-groups

It is a very good idea!

I'm also taking a look in the railcar implementation in the hope it gives me some insights on how to implement it on youki.

@reynn
Copy link

reynn commented May 20, 2021

Can I be assigned the CPU and/or Memory, any tips you may already know of would be awesome but should be able to handle either way!

@utam0k
Copy link
Member Author

utam0k commented May 20, 2021

@reynn
Thanks for your interest!
I would like to assign the CPU of the controller to you. If you finish soon, I may assign another to you.
I look forward to your PR.

@tsturzl
Copy link
Collaborator

tsturzl commented May 20, 2021

I'd be happy to take the memory cgroup controller.

@tsturzl
Copy link
Collaborator

tsturzl commented May 20, 2021

this is another great resource for everyone: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html

Basically the cgroup controller is configured by interaction with a virtual filesystem. You're basically just writing specific things to certain files in a certain directory. The implementation for these should be relatively easy and straightforward for each of these once you know what needs to go where. Happy hacking!

@utam0k
Copy link
Member Author

utam0k commented May 20, 2021

@tsturzl
Thanks for your interest. Of course, I assigned it to you.

I'd be happy to take the memory cgroup controller.

This reference is so cool. I added it in this issue description.

this is another great resource for everyone: https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v1/index.html

I think so too. That's why I'm making this issue a good first issue.

Basically the cgroup controller is configured by interaction with a virtual filesystem. You're basically just writing specific things to certain files in a certain directory. The implementation for these should be relatively easy and straightforward for each of these once you know what needs to go where. Happy hacking!

@Furisto
Copy link
Collaborator

Furisto commented May 21, 2021

I would like to work on the hugepage cgroup controller.

@utam0k
Copy link
Member Author

utam0k commented May 21, 2021

@Furisto
Sure! I assigned you. I am sincerely waiting for your PR.

@tsturzl
Copy link
Collaborator

tsturzl commented May 22, 2021

I can go ahead an take the network controller on. The memory controller PR is just waiting to be merged after I integrate with the changes @Furisto made. I can probably be finished up with the network controller by Monday.

@utam0k
Copy link
Member Author

utam0k commented May 22, 2021

@tsturzl
Your work is amazing!
Okay, I'll assign you to it. I don't intend to rush it, so it would be great if you could proceed. I am sincerely waiting for your PR.

@utam0k utam0k changed the title [Tracking Issue] Support for cgroups [Tracking Issue] Support for cgroups v1 May 22, 2021
@kmpzr
Copy link
Contributor

kmpzr commented May 23, 2021

I'm happy to take another controller if there is still any available :)

@Furisto
Copy link
Collaborator

Furisto commented May 23, 2021

I have started with the blkio controller. Can you assign me @utam0k ?

@utam0k utam0k assigned Furisto and tsturzl and unassigned tsturzl and Furisto Jun 7, 2021
@utam0k
Copy link
Member Author

utam0k commented Jun 7, 2021

@Furisto @tsturzl
I updated the description of this issue. Can you please check if it is correct?

@tsturzl
Copy link
Collaborator

tsturzl commented Jun 7, 2021

@utam0k This looks good. I'm not seeing any missing subsystems that I'm aware of.

@Furisto
Copy link
Collaborator

Furisto commented Jun 8, 2021

@utam0k Fine from my site as well

@thinking-tower
Copy link

@utam0k I'd like to work on perf_event!

@utam0k
Copy link
Member Author

utam0k commented Jun 13, 2021

@thinking-tower Sure, I assigned you it.

@utam0k
Copy link
Member Author

utam0k commented Jun 13, 2021

@thinking-tower There are no integration tests in this controller. So, I would like to add unit tests as much as possible. I'm looking forward to your PR :)

@lizhemingi
Copy link
Contributor

I would like to have a try on freezer.

@utam0k
Copy link
Member Author

utam0k commented Jun 15, 2021

I would like to have a try on freezer.

@duduainankai of course. I assigned you it.

@yjuba
Copy link
Contributor

yjuba commented Jun 16, 2021

I would like to work on cpuacct.

@yjuba
Copy link
Contributor

yjuba commented Jun 16, 2021

I overlooked this PR.
You can forget about my earlier comment.

#72

@utam0k
Copy link
Member Author

utam0k commented Jun 16, 2021

@yjuba Thank you for your interest. There is also a v2 with a similar challenge, what about that one?
#78

@yjuba
Copy link
Contributor

yjuba commented Jun 16, 2021

@utam0k
Thank you for your replies.
I will try to work on cpuacct (v2).

@Furisto
Copy link
Collaborator

Furisto commented Jun 16, 2021

Hey @yjuba, you can have cpuacct if you want it. @PeterYordanov unfortunately doesn't have the time to complete it anymore.

@yjuba
Copy link
Contributor

yjuba commented Jun 16, 2021

@Furisto
Thank you for your replies.
I will try to work on v1-cpuacct.

@utam0k
Copy link
Member Author

utam0k commented Jul 20, 2021

@thinking-tower Do you have any problem? Can I help you?

@utam0k
Copy link
Member Author

utam0k commented Jul 28, 2021

@thinking-tower I'm sorry, but since there seems to be no response, I'm going to remove the assignment.

@utam0k
Copy link
Member Author

utam0k commented Jul 28, 2021

@fbrv Are you interested in implementing perf_event?

@fbrv
Copy link

fbrv commented Jul 28, 2021

It should be pretty easy to implement, just writing the PID in the cgroup.procs file.

@utam0k
Copy link
Member Author

utam0k commented Jul 29, 2021

This issue was completed!
Special thanks @0xdco @reynn @tsturzl @Furisto @yjuba @fbrv @duduainankai

@utam0k utam0k closed this as completed Jul 29, 2021
@thinking-tower
Copy link

@utam0k no worries, thanks for the opportunity!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

10 participants