Repository navigation
devmapper: prevent libdevmapper from deleting device symlinks in RemoveDeviceDeferred - #188
Conversation
…veDeviceDeferred if there is no cookie set in dm task, or flag DM_UDEV_DISABLE_LIBRARY_FALLBACK is cleared for a DM_DEV_REMOVE task, libdevmapper will fallback to clean up the symlink under /dev/mapper by itself, no matter the device removal is executed immediately or deferred by the kernel.In some cases, the removal is deferred by the kernel, while the symlink is deleted directly by libdevmapper, when docker tries to activate the device again, the deferred removal will be canceld, but the symlink will not show up again, so docker's attempt to mount the device by the symlink will fail, and it will eventually leads to a `docker start/diff` error. Fixes moby#24671 Signed-off-by: Ji.Zhilong <[email protected]>
|
We need this patch backported. I have created this PR for rhel-1.10.3 branch. We will need a similar one for fedora-1.10.3 as well. |
|
I'll take care of the Fedora branch, is this issue to be backported to 1.12 branch as well? |
|
LGTM |
|
This is required in 1.12 as well. Would be good if upstream docker can do it. If they are not planning another release, then we will have to do it internally. |
|
Sounds good |
|
LGTM |
|
@runcom, I don't think upstream is releasing this in 1.12. So we need to backport this fix for rhel/fedora 1.12 |
|
@rhvgoyal, wait, if this is fixing something in the 1.12.x release then it can be included in the upcoming 1.12.2 release (and then we'll just rebase our branch w/o backporting anything). So, I don't remember, but, is this fixing any issue present in 1.12 so we can include it in 1.12.2 here upstream? |
|
@runcom I did not know that there are plans for 1.12.2. So here is the original issue. I had mentioned previously to include the PR in docker if we ever released 1.12.2. I see that michael crosy has labeled PR to be included in 1.12.2. Is there anything else needed to be done to make sure it does get included in 1.12.2. |
|
@rhvgoyal great. Out of the blue, either of moby#26212 or moby#26378 are fixing something in 1.12.z which can be included in the upcoming 1.12.2 upstream? I discussed this morning with upstream and we ended up declaring they will be included in 1.13 but if you think they are for 1.12.2 please comment on the PRs upstream. |
This is backport of upstream for docker-1.10.3
if there is no cookie set in dm task, or flag DM_UDEV_DISABLE_LIBRARY_FALLBACK
is cleared for a DM_DEV_REMOVE task, libdevmapper will fallback to clean up the
symlink under /dev/mapper by itself, no matter the device removal is executed
immediately or deferred by the kernel.In some cases, the removal is deferred by the
kernel, while the symlink is deleted directly by libdevmapper, when docker tries to
activate the device again, the deferred removal will be canceld, but the symlink will
not show up again, so docker's attempt to mount the device by the symlink will fail,
and it will eventually leads to a
docker start/differror.Fixes moby#24671
Signed-off-by: Ji.Zhilong [email protected]