Skip to content
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

oci: handle early exited container faster in stop loop #7735

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

haircommander
Copy link
Member

if we hit a TOCTOU race with c.Living() and StopLoopForContainer, then we will be forced to wait until the kubelet re-requests. instead, update watchers immediately so this doesn't happen

What type of PR is this?

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix a bug where a container that exits soon after a StopContainer request is issued will be paused in termination for longer than the grace period

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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. labels Feb 5, 2024
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 5, 2024
if we hit a TOCTOU race with c.Living() and StopLoopForContainer, then we will be forced
to wait until the kubelet re-requests. instead, update watchers immediately so this doesn't happen

Signed-off-by: Peter Hunt <pehunt@redhat.com>
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Merging #7735 (e84b654) into main (5a2bbb9) will decrease coverage by 0.02%.
Report is 29 commits behind head on main.
The diff coverage is 21.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7735      +/-   ##
==========================================
- Coverage   47.97%   47.95%   -0.02%     
==========================================
  Files         145      146       +1     
  Lines       16268    16274       +6     
==========================================
  Hits         7804     7804              
+ Misses       7520     7517       -3     
- Partials      944      953       +9     

Copy link
Member

@sohankunkerkar sohankunkerkar left a comment

Choose a reason for hiding this comment

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

/retest
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 5, 2024
Copy link
Contributor

openshift-ci bot commented Feb 5, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, sohankunkerkar

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

The pull request process is described here

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

@rphillips
Copy link
Contributor

/cherry-pick release-1.29

@openshift-cherrypick-robot

@rphillips: once the present PR merges, I will cherry-pick it on top of release-1.29 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.29

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.

@sohankunkerkar
Copy link
Member

/retest

@openshift-merge-bot openshift-merge-bot bot merged commit e9febd3 into cri-o:main Feb 6, 2024
57 of 64 checks passed
@openshift-cherrypick-robot

@rphillips: new pull request created: #7737

In response to this:

/cherry-pick release-1.29

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.

@sohankunkerkar
Copy link
Member

/cherry-pick release-1.28

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #7738

In response to this:

/cherry-pick release-1.28

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.

@sohankunkerkar
Copy link
Member

sohankunkerkar commented Feb 6, 2024

/cherry-pick release-1.27
/cherry-pick release-1.26
/cherry-pick release-1.25

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #7739

In response to this:

/cherry-pick release-1.27
//cherry-pick release-1.26
//cherry-pick release-1.25

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.

@kwilczynski
Copy link
Member

@sohankunkerkar, you might need to kick off release-1.26 and release-1.25 again. I think it didn't pick on the edit to correct the slashes situation. 😄

@sohankunkerkar
Copy link
Member

/cherry-pick release-1.26

@sohankunkerkar
Copy link
Member

/cherry-pick release-1.25

@openshift-cherrypick-robot

@sohankunkerkar: new pull request created: #7745

In response to this:

/cherry-pick release-1.26

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-cherrypick-robot

@sohankunkerkar: new pull request created: #7746

In response to this:

/cherry-pick release-1.25

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.

@sohankunkerkar
Copy link
Member

/cherry-pick release-1.24

@openshift-cherrypick-robot

@sohankunkerkar: #7735 failed to apply on top of branch "release-1.24":

Applying: oci: handle early exited container faster in stop loop
Using index info to reconstruct a base tree...
M	internal/oci/container.go
M	internal/oci/runtime_oci.go
M	internal/oci/runtime_oci_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/oci/runtime_oci_test.go
CONFLICT (content): Merge conflict in internal/oci/runtime_oci_test.go
Auto-merging internal/oci/runtime_oci.go
CONFLICT (content): Merge conflict in internal/oci/runtime_oci.go
Auto-merging internal/oci/container.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 oci: handle early exited container faster in stop loop
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.24

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.

@kwilczynski
Copy link
Member

@sohankunkerkar, did someone ask for 1.24?

I think, it might be safe to stop at 1.25 at this point. We should be out of support for 1.24 since 1.29 came to be.

Also, among some of the users of 1.24 and 1.25, the OpenShift 4.10 and 4.11 is also officially out of support.

@sohankunkerkar
Copy link
Member

Yeah, I realized that. I was under the impression that version 1.24 of cri-o is included in OCP 4.12. Thanks for the pointers.

brianmcarey added a commit to brianmcarey/kubevirt that referenced this pull request Feb 26, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
Updates are required in kubevirtci to get the updated crio version for
1.27.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does nto include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
brianmcarey added a commit to brianmcarey/kubevirt that referenced this pull request Feb 26, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
The updated rpm for the 1.27 provider is not yet available.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does nto include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
brianmcarey added a commit to brianmcarey/kubevirt that referenced this pull request Feb 26, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
The updated rpm for the 1.27 provider is not yet available.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does not include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
brianmcarey added a commit to brianmcarey/kubevirt that referenced this pull request Feb 26, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
The updated rpm for the 1.27 provider is not yet available.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does not include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
akalenyu pushed a commit to akalenyu/kubevirt that referenced this pull request Mar 3, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
The updated rpm for the 1.27 provider is not yet available.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does not include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
akalenyu pushed a commit to akalenyu/kubevirt that referenced this pull request Mar 3, 2024
This bump includes crio fixes[1] for the k8s-1.28 & k8s-1.29 providers.
The updated rpm for the 1.27 provider is not yet available.

k8s-1.28 - cri-o version v1.28.4
k8s-1.29 - cri-o version v1.29.2

k8s-1.27 remains on cri-o version v1.27.2 which does not include the
required fix.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
brianmcarey added a commit to brianmcarey/kubevirt that referenced this pull request Mar 11, 2024
…ower deletion issue

There was an issue in cri-o[1] that caused these tests to be very flaky.

This has been fixed in the latest releases of cri-o so we can
reintroduce these tests to the presubmit test lanes.

[1] cri-o/cri-o#7735

Signed-off-by: Brian Carey <bcarey@redhat.com>
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. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants