-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver #2014
Conversation
This doesn't seem to be enough... Many tests fail with:
I'll maybe rethink this to use a boolean flag such as |
More information should help troubleshoot an issue when this error occurs. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This allows us to test runc using libcontainer's systemd driver, by passing an extra `--systemd-cgroup` argument to the calls to runc. Tested: $ sudo make localintegration TESTPATH='/exec.bats' RUNC_USE_SYSTEMD=1 And confirmed that systemd was in use by looking at creation and removal of libcontainer_<pid>_systemd_test_default.slice test slices. Also introduced a breakage in systemd cgroup driver and confirmed that the tests failed as expected. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
When $RUNC_USE_SYSTEMD is set, then use a systemd syntax for the cgroupsPath. Also fix $CGROUPS_PATH to look under the actual path to the slice/scope created by systemd. Tested: $ sudo make localintegration TESTPATH='/cgroups.bats' RUNC_USE_SYSTEMD=1 That test will fail without this commit. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
These tests sometimes hang, so let's skip them for now. Tested: $ sudo make localintegration TESTPATH='/checkpoint.bats' RUNC_USE_SYSTEMD=1 The 5 tests in this test suite will be skipped. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Ok, this has now been updated and passes tests.
/cc @mrunalp Please take a look! Cheers, |
/hold @filbranden is going to add travis tests for this as well. |
The additional test shows as a separate job. It sets environment RUNC_USE_SYSTEMD=1 so it will be clear in Travis-CI that this job is testing the systemd cgroup driver. Signed-off-by: Filipe Brandenburger <filbranden@google.com>
@mrunalp Done, added a commit to add a Travis-CI job to run the systemd cgroup driver integration tests. PTAL. |
1 similar comment
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7 changes included: - opencontainers/runc#2012 Need to setup labeling of kernel keyrings - opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver - opencontainers/runc#2015 Use getenv not secure_getenv - fixes opencontainers/runc#2013 build fails with musl libc - opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7 changes included: - opencontainers/runc#2012 Need to setup labeling of kernel keyrings - opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver - opencontainers/runc#2015 Use getenv not secure_getenv - fixes opencontainers/runc#2013 build fails with musl libc - opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit bc6ac08) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7 changes included: - opencontainers/runc#2012 Need to setup labeling of kernel keyrings - opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver - opencontainers/runc#2015 Use getenv not secure_getenv - fixes opencontainers/runc#2013 build fails with musl libc - opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit bc6ac08) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This allows us to test runc using libcontainer's systemd driver, by passing a
RUNC_USE_SYSTEMD=1
argument to localintegration tests.Tested:
All tests passed to me (with exception of one writing to
blkio.weight
which for some reason is missing on my Linux kernel 5.0, will look into that...)And confirmed that systemd was in use by looking at creation and removal of
libcontainer_<pid>_systemd_test_default.slice
test slices. Also introduced a breakage in systemd cgroup driver and confirmed that the tests failed as expected.