Carry #35333: Devicemapper: ignore Nodata errors when delete thin device#35919
Conversation
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]>
…te thin device This fix adds a test case for 35333: Devicemapper: ignore Nodata errors when delete thin device Signed-off-by: Yong Tang <[email protected]>
|
Thanks @yongtang! ping @kolyshkin @vieux |
| dmSawBusy bool | ||
| dmSawExist bool | ||
| dmSawEnxio bool // No Such Device or Address | ||
| dmSawEnoData bool // No data available |
There was a problem hiding this comment.
Could these be returned from task.run() instead of globals?
There was a problem hiding this comment.
@dnephin The value is passed through a log callback:
https://github.com/moby/moby/blob/master/pkg/devicemapper/devmapper_log.go#L42-L56
which is wrapped in cgo:
https://github.com/moby/moby/blob/master/pkg/devicemapper/devmapper_wrapper.go#L13
I think it might be difficult to return from task.run()
There was a problem hiding this comment.
ok, yes that does seem like it would require a much bigger change to fix.
| client := request.NewAPIClient(t) | ||
| ctx := context.Background() | ||
|
|
||
| foo, err := client.ContainerCreate(ctx, |
There was a problem hiding this comment.
Does this change actually need a container to exist, or could this be a unit test in pkg/devicemapper ?
There was a problem hiding this comment.
@dnephin The PR tries to fix the issue where an out-of-sync deletion of pool device will not prevent container deletion from returning an error. Though I am not very familiar with this part of the code. There is no existing unit test in pkg/devicemapper so not sure if it is possible to created a unit test easily.
|
As I said in #35333
LGTM |
- What I did
This fix carries #35333 and adds the needed test to cover the changes.
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
This fix fixes #34463. This fix closes #35333.