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

Skip to content

Conversation

@haircommander
Copy link
Member

UpdateContainer requests can come in at any time in a container's
lifecycle, even when it's shutting down.

In some cases, it can cause a container to get stuck: runc pauses the
cgroup on v1 and systemd to prevent systemd from mucking around while
the cgroup is being updated. In some cases, CRI-O calls
UpdateContainerStatus during that time, and gets paused state. CRI-O
does not expect a container to be paused, so it doesn't know how to
handle it.

Fix this by taking opLock when updating

Signed-off-by: Peter Hunt [email protected]

What type of PR is this?

/kind bug

What this PR does / why we need it:

related to https://bugzilla.redhat.com/show_bug.cgi?id=2094865

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 is stuck in INIT because CRI-O believes it to be paused, and never updates the state

UpdateContainer requests can come in at any time in a container's
lifecycle, even when it's shutting down.

In some cases, it can cause a container to get stuck: runc pauses the
cgroup on v1 and systemd to prevent systemd from mucking around while
the cgroup is being updated. In some cases, CRI-O calls
`UpdateContainerStatus` during that time, and gets `paused` state. CRI-O
does not expect a container to be paused, so it doesn't know how to
handle it.

Fix this by taking opLock when updating

Signed-off-by: Peter Hunt <[email protected]>
@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 Aug 3, 2022
@openshift-ci openshift-ci bot requested review from QiWang19 and klihub August 3, 2022 17:45
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2022
@TomSweeneyRedHat
Copy link
Contributor

LGTM
assuming happy tests

@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #6122 (3e0aa19) into main (dcde858) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #6122      +/-   ##
==========================================
- Coverage   42.88%   42.87%   -0.01%     
==========================================
  Files         117      117              
  Lines       12735    12737       +2     
==========================================
  Hits         5461     5461              
- Misses       6722     6724       +2     
  Partials      552      552              

@haircommander
Copy link
Member Author

@saschagrunert PTAL

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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 4, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haircommander, 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:
  • OWNERS [haircommander,saschagrunert]

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

@openshift-bot
Copy link

/retest-required

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

13 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-ci openshift-ci bot merged commit 20f639c into cri-o:main Aug 4, 2022
@haircommander
Copy link
Member Author

/cherry-pick release-1.24

@openshift-cherrypick-robot

@haircommander: new pull request created: #6129

Details

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.

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.

5 participants