-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[1.17] server: cleanup container in runtime after failed creation #4207
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
[1.17] server: cleanup container in runtime after failed creation #4207
Conversation
otherwise, we leak containers in runc Signed-off-by: Peter Hunt <[email protected]>
Codecov Report
@@ Coverage Diff @@
## release-1.17 #4207 +/- ##
================================================
- Coverage 44.68% 44.65% -0.03%
================================================
Files 90 90
Lines 7698 7703 +5
================================================
Hits 3440 3440
- Misses 3961 3966 +5
Partials 297 297 |
|
@haircommander: The following tests failed, say
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. |
| if retErr != nil { | ||
| log.Infof(ctx, "createCtr: removing container ID %s from runtime", containerID) | ||
| if err2 := s.Runtime().DeleteContainer(container); err2 != nil { | ||
| log.Warnf(ctx, "failed to delete container in runtime %s: %v", containerID, err) |
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.
I'd pref, the below, YMMV:
| log.Warnf(ctx, "failed to delete container in runtime %s: %v", containerID, err) | |
| log.Warnf(ctx, "failed to delete container %s in runtime: %v", containerID, err) |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, mrunalp 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 |
|
/lgtm |
otherwise, we leak containers in runc
Signed-off-by: Peter Hunt [email protected]
What type of PR is this?
/kind bug
What this PR does / why we need it:
cherry pick of #4201
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?