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

Ensure cgroup error behavior is consistent with runc #333

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

Furisto
Copy link
Collaborator

@Furisto Furisto commented Sep 25, 2021

This should fix #328.

  • If no cgroup path is specified, we will default to /sys/fs/cgroup/[containerid].
  • If any error is encountered during container creation, the cgroup will be removed and the container state directory will be deleted.

@YJDoc2 Can you confirm that this fixes your problem?

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2021

Codecov Report

Merging #333 (f04c443) into main (4224d56) will decrease coverage by 0.52%.
The diff coverage is 6.66%.

@@            Coverage Diff             @@
##             main     #333      +/-   ##
==========================================
- Coverage   71.14%   70.61%   -0.53%     
==========================================
  Files          46       46              
  Lines        6828     6882      +54     
==========================================
+ Hits         4858     4860       +2     
- Misses       1970     2022      +52     

@utam0k utam0k requested a review from YJDoc2 September 26, 2021 07:12
@@ -355,3 +356,21 @@ pub(crate) fn default_devices() -> Vec<LinuxDevice> {
},
]
}

pub(crate) fn delete_with_retry<P: AsRef<Path>>(path: P) -> Result<()> {
Copy link
Member

Choose a reason for hiding this comment

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

I think it is more versatile to have the number of retries and the delay as arguments. What do you think?

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Sep 26, 2021

Sorry for the delay, I checked, and this is now consistent with runc. This should fix and close #328 . Thanks for the fix, now I will go ahead with rest of the integration test 👍 😄

@Furisto Furisto force-pushed the cg-delete branch 2 times, most recently from b9ac863 to a47506e Compare September 26, 2021 19:03
@Furisto
Copy link
Collaborator Author

Furisto commented Sep 26, 2021

@utam0k PTAL

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.

LGTM

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.

Invalid TLB configuration still creates cgroup, and youki process
4 participants