-
Notifications
You must be signed in to change notification settings - Fork 1.1k
make all operations read state atomically #3864
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
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander 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 |
0d97b65 to
601cc5f
Compare
Codecov Report
@@ Coverage Diff @@
## master #3864 +/- ##
=======================================
Coverage 40.54% 40.54%
=======================================
Files 109 109
Lines 8798 8804 +6
=======================================
+ Hits 3567 3570 +3
- Misses 4913 4914 +1
- Partials 318 320 +2 |
there are still two cases where the container state isn't checked atomically: container start and sandbox remove fix these cases, so we don't risk updating state based on stale data. Signed-off-by: Peter Hunt <[email protected]>
601cc5f to
339ae08
Compare
|
I will get to this after #3868, I think we need an internal UpdateContainerStatus() |
| } | ||
|
|
||
| func (c *Container) ShouldBeStarted() error { | ||
| if c.state.Status == ContainerStateCreated { |
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.
Should we check if the container is in running state as well? If not, can we rename the function to ShouldBeCreated? ShouldBeStarted makes me think that running state is valid as well.
|
@haircommander: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
|
@haircommander: 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. |
|
replacing this with #4406 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
there are still two cases where the container state isn't checked atomically: container start and sandbox remove
fix these cases, so we don't risk updating state based on stale data
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?