Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver#2014
Merged
dqminh merged 5 commits intoopencontainers:masterfrom Mar 15, 2019
Merged
Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver#2014dqminh merged 5 commits intoopencontainers:masterfrom
dqminh merged 5 commits intoopencontainers:masterfrom
Conversation
Contributor
Author
|
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>
Contributor
Author
|
Ok, this has now been updated and passes tests.
/cc @mrunalp Please take a look! Cheers, |
Contributor
Contributor
|
/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>
Contributor
Author
|
@mrunalp Done, added a commit to add a Travis-CI job to run the systemd cgroup driver integration tests. PTAL. |
Contributor
1 similar comment
Contributor
Contributor
Author
thaJeztah
added a commit
to thaJeztah/containerd
that referenced
this pull request
Mar 28, 2019
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>
thaJeztah
added a commit
to thaJeztah/containerd
that referenced
this pull request
Mar 28, 2019
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>
thaJeztah
added a commit
to thaJeztah/containerd
that referenced
this pull request
Mar 28, 2019
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 was referenced Mar 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows us to test runc using libcontainer's systemd driver, by passing a
RUNC_USE_SYSTEMD=1argument to localintegration tests.Tested:
All tests passed to me (with exception of one writing to
blkio.weightwhich 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.slicetest slices. Also introduced a breakage in systemd cgroup driver and confirmed that the tests failed as expected.