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

[1.0] libct/cg/sd/v1: fix freezeBeforeSet (alt 2) #3167

Merged
merged 3 commits into from
Aug 20, 2021

Commits on Aug 18, 2021

  1. libct/cg/sd/v1: Fix unnecessary freeze/thaw

    This fixes the behavior intended to avoid freezing containers/control
    groups without it being necessary. This is important for end users of
    libcontainer who rely on the behavior of no freeze.
    
    The previous implementation would always get error trying to get
    DevicePolicy from the Unit via dbus, since the Unit interface doesn't
    contain DevicePolicy.
    
    Signed-off-by: Odin Ugedal <odin@uged.al>
    (cherry picked from commit 4104367)
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    odinuge authored and kolyshkin committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    4ce440f View commit details
    Browse the repository at this point in the history
  2. libct/cg/sd/v1: add freezeBeforeSet unit test

    Add a test for freezeBeforeSet, checking various scenarios including
    those that were failing before the fix in the previous commit.
    
    [v2: add more cases, add a check before creating a unit.]
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    (cherry picked from commit fec49f2)
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    1850dc1 View commit details
    Browse the repository at this point in the history
  3. libct/cg/sd/v1: add SkipFreezeOnSet knob

    This is helpful to kubernetes in cases it knows for sure that the freeze
    is not required (since it created the systemd unit with no device
    restrictions).
    
    As the code is trivial, no tests are required.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    (cherry picked from commit 9a095e4)
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    8ec5762 View commit details
    Browse the repository at this point in the history