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

libct/cg: make Set accept configs.Resources #2906

Merged
merged 3 commits into from
Apr 30, 2021

Commits on Apr 29, 2021

  1. libct/cg/sd/v2: fix Set argument

    For some reason, systemd cgroup v2 driver's Set is not using its
    container argument when generating systemd unit properties.
    
    This bug is not detected by our update tests as we run a new binary
    every time and thus a new instance of a cgroup manager.
    
    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    af0710a View commit details
    Browse the repository at this point in the history
  2. libct/cg: make Set accept configs.Resources

    A cgroup manager's Set method sets cgroup resources, but historically
    it was accepting configs.Cgroups.
    
    Refactor it to accept resources only. This is an improvement from the
    API point of view, as the method can not change cgroup configuration
    (such as path to the cgroup etc), it can only set (modify) its
    resources/limits.
    
    This also lays the foundation for complicated resource updates, as now
    Set has two sets of resources -- the one that was previously specified
    during cgroup manager creation (or the previous Set), and the one passed
    in the argument, so it could deduce the difference between these. This
    is a long term goal though.
    
    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    3f65946 View commit details
    Browse the repository at this point in the history
  3. libc/cg: improve Manager docs

    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    abf12ce View commit details
    Browse the repository at this point in the history