Cleanup workdirs on manager load#2509
Merged
estesp merged 1 commit intocontainerd:masterfrom Jul 30, 2018
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2509 +/- ##
======================================
Coverage 45% 45%
======================================
Files 93 93
Lines 9583 9583
======================================
Hits 4313 4313
Misses 4575 4575
Partials 695 695
Continue to review full report at Codecov.
|
estesp
reviewed
Jul 30, 2018
Member
There was a problem hiding this comment.
nit: error string typo: s/direction/directory/
This cleans up persistent work dirs on TaskManager boot. These dirs can be left behind in a machine reboot. The state in /run will not exist but the work dir in the root does, we should cleanup work dirs when tasks are not loaded. This also improves error handling that would prevent the task manager from loading when a single task fails to load or cleanup. Signed-off-by: Michael Crosby <[email protected]>
d0ae672 to
23fbdba
Compare
Member
Author
|
@estesp updated |
dmcgowan
reviewed
Jul 30, 2018
| if _, err := binaryCall.Delete(ctx); err != nil { | ||
| return errors.Wrapf(err, "remove disk state %s", id) | ||
| log.G(ctx).WithError(err).Errorf("binary call to delete for %s", id) | ||
| continue |
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This cleans up persistent work dirs on TaskManager boot. These dirs can
be left behind in a machine reboot. The state in /run will not exist
but the work dir in the root does, we should cleanup work dirs when
tasks are not loaded.
This also improves error handling that would prevent the task manager
from loading when a single task fails to load or cleanup.
Signed-off-by: Michael Crosby [email protected]