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

Support recursive mount attrs by using mount_setattr(2). #1398

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

higuruchi
Copy link
Contributor

Implement "rro" mount option that implemented in runc(opencontainers/runc#3272) and crun(containers/crun#778).

This mount option "rro" makes the mount point recursively read-only, by calling mount_setattr(2) with MOUNT_ATTR_RDONLY and AT_RECURSIVE.

Signed-off-by: higuruchi [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Dec 6, 2022

Codecov Report

Merging #1398 (0631de9) into main (3a6d105) will increase coverage by 0.21%.
The diff coverage is 86.15%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1398      +/-   ##
==========================================
+ Coverage   68.80%   69.02%   +0.21%     
==========================================
  Files         119      119              
  Lines       12664    13041     +377     
==========================================
+ Hits         8713     9001     +288     
- Misses       3951     4040      +89     

@higuruchi higuruchi marked this pull request as draft December 6, 2022 12:07
@higuruchi higuruchi force-pushed the Support/Recursive_mount_attrs branch 2 times, most recently from c1f61f3 to 7e886ad Compare December 6, 2022 12:21
@higuruchi higuruchi force-pushed the Support/Recursive_mount_attrs branch from 7e886ad to 7c4ff41 Compare December 6, 2022 12:28
@higuruchi higuruchi marked this pull request as ready for review December 6, 2022 12:37
Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR. Awesome. I left some comments

@higuruchi higuruchi force-pushed the Support/Recursive_mount_attrs branch 7 times, most recently from afa6111 to f25f745 Compare December 11, 2022 04:23
Implemented MountAttrOption enum.

Signed-off-by: higuruchi <[email protected]>
MountAttrNosymfollow(bool, u64),
}

impl FromStr for MountAttrOption {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it

Copy link
Member

@utam0k utam0k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@higuruchi May I ask you to add a test about this in another PR? If you don't have time, please create the issue, and we can take over from you.

@utam0k utam0k merged commit 6d698da into containers:main Dec 13, 2022
@higuruchi
Copy link
Contributor Author

@utam0k

I have never written a test for youki, can I try it?

@utam0k
Copy link
Member

utam0k commented Dec 15, 2022

I have never written a test for youki, can I try it?

@higuruchi Sure! If you have trouble or a question about that, please create the issue and ping me or @YJDoc2 (He is a professional for our integration test)

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Dec 18, 2022

@higuruchi Sure, let me know if you face any issues. Currently #361 is used to track porting of OCI integration tests, you can take a look at it and start from there 👍

@higuruchi higuruchi mentioned this pull request Dec 19, 2022
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants