Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fgiudici
Copy link
Contributor

@fgiudici fgiudici commented Aug 19, 2020

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

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]>
@openshift-ci-robot
Copy link

@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.

Details

Instructions 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.

@openshift-ci-robot openshift-ci-robot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Aug 19, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fgiudici
To complete the pull request process, please assign mrunalp
You can assign the PR to them by writing /assign @mrunalp in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Aug 19, 2020
@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 19, 2020
@openshift-ci-robot
Copy link

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #4099 (cf8d89d) into master (7ca8fa8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4099   +/-   ##
=======================================
  Coverage   41.22%   41.22%           
=======================================
  Files         109      109           
  Lines        9029     9029           
=======================================
  Hits         3722     3722           
  Misses       4968     4968           
  Partials      339      339           

@umohnani8
Copy link
Member

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 19, 2020
@umohnani8
Copy link
Member

LGTM


# Run crio using the binary specified by $CRIO_BINARY_PATH.
# This must ONLY be run on engines created with `start_crio`.
function crio() {
Copy link
Member

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.

@haircommander
Copy link
Member

I actually think I have a different way of doing this which simplifies

@TomSweeneyRedHat
Copy link
Contributor

LGTM

@saschagrunert
Copy link
Member

/retest

@openshift-merge-robot
Copy link
Contributor

@fgiudici: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic cf8d89d link /test e2e-agnostic

Full PR test history. Your PR dashboard.

Details

Instructions 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.

@fidencio
Copy link
Contributor

@fgiudici, @haircommander, can we close this one in favour of #4100?

@fgiudici
Copy link
Contributor Author

@fgiudici, @haircommander, can we close this one in favour of #4100?

Absolutely! Thanks, closing

@fgiudici fgiudici closed this Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants