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

Skip to content

Conversation

@littlejawa
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

When running ExecSync with a timeout, do not report an error, but make an ExecSyncResponse showing that a timeout occurred.

This PR copies the logic found in runtime_oci.go:ExecSyncContainer(), and applies it to runtime_vm.go:ExecSyncContainer(), so that both have the same behaviour.

Which issue(s) this PR fixes:

This issue was found by running the integration tests with Kata as the runtime.
The test "ctr execsync" was failing because the error reported on a timeout was not the one expected.
With this PR, the test passes.

Does this PR introduce a user-facing change?

none

When running ExecSync with a timeout, do not report an error, but make
an ExecSyncResponse showing that a timeout occurred.

Signed-off-by: Julien Ropé <[email protected]>
@openshift-ci openshift-ci bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 28, 2021
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 28, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2021

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

@littlejawa
Copy link
Contributor Author

/cc @fidencio could you get a look?

@haircommander
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot 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 Jun 28, 2021
Copy link
Contributor

@fidencio fidencio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@littlejawa, the patch itself looks good, but I'd like to see a test for this (could be here, could be as part of the kata-containers' bats).

Tomorrow I'll try to exercise this code locally and finally approve (or ask for chances in) this PR.

Thanks for working on this, @littlejawa!

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #5041 (a1a7041) into master (b67b4b5) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head a1a7041 differs from pull request most recent head 4bd79a0. Consider uploading reports for the commit 4bd79a0 to get more accurate results

@@            Coverage Diff             @@
##           master    #5041      +/-   ##
==========================================
- Coverage   41.72%   41.70%   -0.03%     
==========================================
  Files         108      108              
  Lines       10158    10163       +5     
==========================================
  Hits         4238     4238              
- Misses       5471     5476       +5     
  Partials      449      449              

@fidencio
Copy link
Contributor

@littlejawa, the patch itself looks good, but I'd like to see a test for this (could be here, could be as part of the kata-containers' bats).

Oh, I missed the fact this is fixing an issue found by thr ctr bats tests, sorry.
The comment about adding a new error still stands, though. :-)

if exitCode == execTimeout {
return &types.ExecSyncResponse{
Stderr: []byte(conmonconfig.TimedOutMessage),
ExitCode: -1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one not changed on purpose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. According to the equivalent code un runtime_oci.go, this is what the caller expects.

@fidencio
Copy link
Contributor

/ok-to-test

1 similar comment
@fidencio
Copy link
Contributor

/ok-to-test

@fidencio
Copy link
Contributor

LGTM, thanks @littlejawa!

@haircommander, @saschagrunert, may I bother you for your input here as well?

@haircommander
Copy link
Member

/lgtm
/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 29, 2021
@haircommander
Copy link
Member

I'll let @saschagrunert give the approval :)

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: littlejawa, saschagrunert

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

The pull request process is described 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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 29, 2021
@saschagrunert
Copy link
Member

/override ci/prow/e2e-gcp

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2021

@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-gcp

Details

In response to this:

/override ci/prow/e2e-gcp

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

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@haircommander
Copy link
Member

/override ci/prow/e2e-gcp

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2021

@haircommander: Overrode contexts on behalf of haircommander: ci/prow/e2e-gcp

Details

In response to this:

/override ci/prow/e2e-gcp

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

/retest

Please review the full test history for this PR and help us cut down flakes.

5 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 29, 2021

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

Test name Commit Details Rerun command
ci/openshift-jenkins/e2e_crun_cgroupv2 4bd79a0 link /test e2e_cgroupv2

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.

@openshift-merge-robot openshift-merge-robot merged commit 9dd6f42 into cri-o:master Jun 29, 2021
@littlejawa littlejawa deleted the ctr_execsync branch October 26, 2021 14:57
littlejawa added a commit to littlejawa/tests that referenced this pull request Nov 2, 2021
Enable this test on cri-o v1.22 and above, where the fix is available.

(see: cri-o/cri-o#5041)

Signed-off-by: Julien Ropé <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants