-
Notifications
You must be signed in to change notification settings - Fork 1.1k
tests: support default runtime different from runc #4099
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
Conversation
When running the tests specifing a different runtime, like, e.g.:
$> CONTAINER_DEFAULT_RUNTIME=crun \
RUNTIME_NAME=crun \
CONTAINER_RUNTIME=crun \
RUNTIME_ROOT=/run/containers \
make localintegration
make sure the runtime configuration is always available.
Some tests (command.bats and config_migrate.bats) call the crio binary
without passing the RUNTIME_NAME, CONTAINER_RUNTIME and the RUNTIME_ROOT
environment variables, while CONTAINER_DEFAULT_RUNTIME is taken up
directly by the crio binary. This will cause the test to fail as the
default runtime is not found in the config.
----
# (in test file test/command.bats, line 71)
# `[[ "$output" == *"log size max should be negative or >= 8192"* ]]' failed
# time="2020-08-18 14:27:11.944731362+02:00" level=info msg="Node configuration value for hugetlb cgroup is true" time="2020-08-18 14:27:11.944804578+02:00" level=info msg="Node configuration value for pid cgroup is true" time="2020-08-18 14:27:11.944824466+02:00" level=info msg="Node configuration value for memoryswap cgroup is true" time="2020-08-18 14:27:11.950071414+02:00" level=info msg="Node configuration value for systemd CollectMode is true" time="2020-08-18 14:27:11.950143720+02:00" level=fatal msg="Validating runtime config: default_runtime set to \"crun\", but no runtime entry was found for it"
Signed-off-by: Francesco Giudici <[email protected]>
|
@fgiudici: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fgiudici The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @fgiudici. Thanks for your PR. I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## master #4099 +/- ##
=======================================
Coverage 41.22% 41.22%
=======================================
Files 109 109
Lines 9029 9029
=======================================
Hits 3722 3722
Misses 4968 4968
Partials 339 339 |
|
/ok-to-test |
|
LGTM |
|
|
||
| # Run crio using the binary specified by $CRIO_BINARY_PATH. | ||
| # This must ONLY be run on engines created with `start_crio`. | ||
| function crio() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a follow up (or you can address it here) we should change this function name (crio-with-args?) it is not clear we're not running the crio binary in $PATH when calling it above.
|
I actually think I have a different way of doing this which simplifies |
|
LGTM |
|
/retest |
|
@fgiudici: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@fgiudici, @haircommander, can we close this one in favour of #4100? |
Absolutely! Thanks, closing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
When running the tests specifing a different runtime, like, e.g.:
$> CONTAINER_DEFAULT_RUNTIME=crun
RUNTIME_NAME=crun
CONTAINER_RUNTIME=crun
RUNTIME_ROOT=/run/containers
make localintegration
some tests (command.bats and config_migrate.bats) call the crio binary
without passing the RUNTIME_NAME, CONTAINER_RUNTIME and the RUNTIME_ROOT
environment variables, while CONTAINER_DEFAULT_RUNTIME is taken up
directly by the crio binary. This will cause the test to fail as the
default runtime is not found in the config.
(in test file test/command.bats, line 71)
`[[ "$output" == "log size max should be negative or >= 8192" ]]' failed
time="2020-08-18 14:27:11.944731362+02:00" level=info msg="Node configuration value for hugetlb cgroup is true" time="2020-08-18 14:27:11.944804578+02:00" level=info msg="Node configuration value for pid cgroup is true" time="2020-08-18 14:27:11.944824466+02:00" level=info msg="Node configuration value for memoryswap cgroup is true" time="2020-08-18 14:27:11.950071414+02:00" level=info msg="Node configuration value for systemd CollectMode is true" time="2020-08-18 14:27:11.950143720+02:00" level=fatal msg="Validating runtime config: default_runtime set to "crun", but no runtime entry was found for it"
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
This looked to me as the best approach to deal with tests that need to call the CRI-O binary directly if we want to support running integration tests with different runtimes than runc.
Does this PR introduce a user-facing change?
None