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

Use remove_dir instead of remove_dir_all because youki doesn't have permission to delete contents in cgroup directory. #165

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

utam0k
Copy link
Member

@utam0k utam0k commented Jul 28, 2021

I ran the delete in the tutorial and got an error.

https://doc.rust-lang.org/std/fs/fn.remove_dir_all.html

Removes a directory at this path, after removing all its contents. Use carefully!

https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html

A cgroup which doesn’t have any children or live processes can be destroyed by removing the directory. Note that a cgroup which doesn’t have any children and is associated only with zombie processes is considered empty and can be removed:
rmdir $CGROUP_NAME

…ve permission to delete contents in cgroup directory.

https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html
> A cgroup which doesn’t have any children or live processes can be destroyed by removing the directory. Note that a cgroup which doesn’t have any children and is associated only with zombie processes is considered empty and can be removed:
> rmdir $CGROUP_NAME
Copy link
Collaborator

@YJDoc2 YJDoc2 left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@utam0k utam0k merged commit b236cea into youki-dev:main Jul 28, 2021
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.

2 participants