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

sbin/init.wrapper: remove processes from subcgroups before deleting #63

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

jepio
Copy link
Member

@jepio jepio commented Mar 2, 2022

sbin/init.wrapper: remove processes from subcgroups before deleting

In an attempt to prevent the cgroup from being busy when we unbind controllers
from it.

Will be cherry-picked to flatcar-3139.

How to use

[ describe what reviewers need to do in order to validate this PR ]

Testing done

http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/5007/cldsv/

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)

In an attempt to prevent the cgroup from being busy when we unbind controllers
from it.
Copy link
Member

@krnowak krnowak left a comment

Choose a reason for hiding this comment

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

Hopefully the pids of the processes spawned during this cleanup won't end up in any of the cgroup.procs that we are trying to clean up.

@jepio
Copy link
Member Author

jepio commented Mar 2, 2022

This loop:

  find /sys/fs/cgroup/*/ -name cgroup.procs -exec grep . {} \; | \
  while read pid; do
    echo "$pid" >/sys/fs/cgroup/cgroup.procs 2>/dev/null
  done

also covers "self", thats accounted for :)

@jepio jepio merged commit 5f97a6a into flatcar-master Mar 2, 2022
jepio added a commit that referenced this pull request Mar 2, 2022
sbin/init.wrapper: remove processes from subcgroups before deleting
@jepio jepio deleted the jepio/fix-cgroupv1-em branch March 2, 2022 16:06
jepio added a commit that referenced this pull request Mar 17, 2022
sbin/init.wrapper: remove processes from subcgroups before deleting
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