-
Notifications
You must be signed in to change notification settings - Fork 1.1k
server: cleanup on failure fixes #4198
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
server: cleanup on failure fixes #4198
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4198 +/- ##
==========================================
- Coverage 38.59% 38.57% -0.02%
==========================================
Files 111 111
Lines 8893 8897 +4
==========================================
Hits 3432 3432
- Misses 5077 5081 +4
Partials 384 384 |
|
@haircommander, could this be linked to #4000? |
|
yes that certainly does seem plausable, good thought |
Sadly this PR doesn't solve that issue mentioned. |
9bf2897 to
b8dc287
Compare
|
LGTM |
|
The changes do not fix #4000, but they do make sense to me. |
|
/retest |
b8dc287 to
5755891
Compare
|
/retest |
|
LGTM |
1392481 to
89e450e
Compare
|
/retest |
89e450e to
0cd4da2
Compare
|
/lgtm |
0cd4da2 to
045692d
Compare
|
/lgtm |
|
/retest |
server/container_create_linux.go
Outdated
| err2 := s.StorageRuntimeServer().DeleteContainer(containerInfo.ID) | ||
| if err2 != nil { |
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.
| err2 := s.StorageRuntimeServer().DeleteContainer(containerInfo.ID) | |
| if err2 != nil { | |
| err := s.StorageRuntimeServer().DeleteContainer(containerInfo.ID); if err != nil { |
server/container_create.go
Outdated
| defer func() { | ||
| if retErr != nil { | ||
| log.Infof(ctx, "createCtr: removing container ID %s from runtime", ctr.ID()) | ||
| if err2 := s.Runtime().DeleteContainer(newContainer); err2 != nil { |
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.
| if err2 := s.Runtime().DeleteContainer(newContainer); err2 != nil { | |
| if err := s.Runtime().DeleteContainer(newContainer); err != nil { |
045692d to
9de15be
Compare
|
(most) comments addressed, PTAL |
|
/retest |
/retest |
to improve readability Signed-off-by: Peter Hunt <[email protected]>
otherwise, we leak containers in runc Signed-off-by: Peter Hunt <[email protected]>
9de15be to
e9d9b30
Compare
Most (but not all) of the images we use in bats tests are prefetched and copied to every crio test root, but it still re-checks for updates (if I get it right). @haircommander @mrunalp what do you think about introducing a flag to crio to not re-check an image from network if it's already there, and use it for such tests (and only for tests)? This should result in less flakes like the one above (and slightly faster tests, but that's not the point). |
kolyshkin
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
(I've checked and yes indeed, there's no functional change in the first commit)
I believe the problem is actually containers/container-libs#267 when really, the problem is that that metadata isn't needed per-se, because that specific layer is an empty one I never got a full grasp of the problem though |
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: haircommander, kolyshkin, 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 |
seems like a git flake |
What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
I've wrapped a few fixes in one, as they're all related to cleaning up after failed container creates. More details in each commit
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?