Devicemapper: ignore Nodata errors when delete thin device#35333
Closed
liusdu wants to merge 1 commit into
Closed
Conversation
Member
|
ping @kolyshkin PTAL |
thaJeztah
reviewed
Oct 30, 2017
Member
There was a problem hiding this comment.
s/do not exist/does not exist/
Contributor
There was a problem hiding this comment.
It would be worth mentioning that the error is being ignored, like
+ logrus.Debugf("devicemapper: Device(id: %d) from pool(%s) does not exist, ignoring", deviceID, poolName)if thin device is deteled and the metadata exists, you can not delete related containers. This patch ignore Nodata errors for thin device deletion Signed-off-by: Liu Hua <[email protected]>
Contributor
Author
|
@thaJeztah updated |
Contributor
|
Looks a bit kludgy, but I can't think of anything better, therefore LGTM |
Member
|
ping @rhvgoyal as well 😄 |
Contributor
|
LGTM ping @rhvgoyal |
Member
|
actually discussing this, and possibly we can have a test for this; /cc @kolyshkin |
Contributor
|
@liusdu can you create a simple unit test for this, based on your description on how to verify it? |
Member
|
ping @liusdu could you add a test? |
Member
|
Added a test case and carries the PR to #35919. Please take a look. |
Contributor
|
I think we can close this one in favor of #35919 |
Member
thaJeztah
added a commit
that referenced
this pull request
Jan 20, 2018
Carry #35333: Devicemapper: ignore Nodata errors when delete thin device
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.
if thin device is deteled and the metadata exists, you can not
delete related containers. This patch ignore Nodata errors for
thin device deletion
Signed-off-by: Liu Hua [email protected]
- What I did
When we killed docker with 9 when we delete containers. We maybe get the following issue
"Driver devicemapper failed to remove root filesystem 090f22f17fa1ca1ff4fab4e19e16ca1b0bfd88df43db5567298e3cecc846af03: devicemapper: Error running DeleteDevice dm_task_run failed" #34463 ?
- How I did it
In the container-deleteing process, we delete the thin device first and then delete the metadata. So if docker is killing between these two actions. we can reproduce this issue. This patch ignore this type of errors.
- How to verify it
Because the time windows is very small, so we can remove device of a existed container. And remove it,
device idand stop container- Description for the changelog