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

cgroupsv2 adjustments #15

Closed
wants to merge 5 commits into from
Closed

cgroupsv2 adjustments #15

wants to merge 5 commits into from

Commits on Jan 15, 2023

  1. Globalizes cgroups path variables

    Makes cgroups/custom_cgroup variables global
    so that they could be easily shared by cg() and cgCleanup()
    x7upLime committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    b3768d9 View commit details
    Browse the repository at this point in the history
  2. Changes chroot path

    Not really necessary..
    it proposes a "get-an-fs" workflow in a "clean-after-reboot" fashion
    x7upLime committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    64d722e View commit details
    Browse the repository at this point in the history
  3. Corrects a "no such file" err

    I assumed "thing" would just be tossed by Mount()
    and that we just needed a (/mytemp) location inside our container to use as a tmpfs
    x7upLime committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    a624758 View commit details
    Browse the repository at this point in the history
  4. Adds a cleaning mechanism that would work in cgroupsv2

    Since the "echo 1 > notify_on_release" feature from cgroupsv1
    seems to have been abandoned in cgroupsv2 and
    (as far as I can tell from [*]) there is no "builtin" cleanup mechanism,
    I think that some extra go code would be necessary:
    
    Initially I thought about something employing "internal/poll",
    as the documentation suggested, but that would've been overcomplicating the poc..
    
    Perhaps an explicit force-removal call, after run(),
    could be the simplest implementation.
    
    (that process check before the rmdir..
    maybe its not something we really need..)
    
    [*] https://docs.kernel.org/admin-guide/cgroup-v2.html#un-populated-notification
    x7upLime committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    f654f8f View commit details
    Browse the repository at this point in the history
  5. Adjusts cg() logic to reflect new cgroupsv2 hierarchy

    It also leaves the file's mod unaltered
    x7upLime committed Jan 15, 2023
    Configuration menu
    Copy the full SHA
    1304cf0 View commit details
    Browse the repository at this point in the history