-
Notifications
You must be signed in to change notification settings - Fork 1.1k
runtimeVM: ExecSync should return a recognizable error on timeout #5041
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 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]>
|
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 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. |
|
/cc @fidencio could you get a look? |
|
/ok-to-test |
fidencio
left a comment
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.
@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 Report
@@ 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 |
Oh, I missed the fact this is fixing an issue found by thr ctr bats tests, sorry. |
| if exitCode == execTimeout { | ||
| return &types.ExecSyncResponse{ | ||
| Stderr: []byte(conmonconfig.TimedOutMessage), | ||
| ExitCode: -1, |
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.
Is this one not changed on purpose?
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.
Yes. According to the equivalent code un runtime_oci.go, this is what the caller expects.
|
/ok-to-test |
1 similar comment
|
/ok-to-test |
Signed-off-by: Julien Ropé <[email protected]>
|
LGTM, thanks @littlejawa! @haircommander, @saschagrunert, may I bother you for your input here as well? |
|
/lgtm |
|
I'll let @saschagrunert give the approval :) |
saschagrunert
left a comment
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.
/lgtm
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/override ci/prow/e2e-gcp |
|
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-gcp DetailsIn response to this:
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. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/override ci/prow/e2e-gcp |
|
@haircommander: Overrode contexts on behalf of haircommander: ci/prow/e2e-gcp DetailsIn response to this:
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. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@littlejawa: 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. |
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]>
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?