Skip to content

devmapper: prevent libdevmapper from deleting device symlinks in RemoveDeviceDeferred - #188

Merged
runcom merged 1 commit into
projectatomic:rhel7-1.10.3from
rhvgoyal:backport-libdm-symlink
Aug 24, 2016
Merged

runcom merged 1 commit into
projectatomic:rhel7-1.10.3from
rhvgoyal:backport-libdm-symlink

Conversation

@rhvgoyal

Copy link
Copy Markdown

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/diff error.

Fixes moby#24671

Signed-off-by: Ji.Zhilong [email protected]

…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]>
@rhvgoyal

Copy link
Copy Markdown
Author

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.

@rhvgoyal

Copy link
Copy Markdown
Author

cc @rhatdan @mrunalp @runcom

@runcom

runcom commented Aug 24, 2016

Copy link
Copy Markdown
Collaborator

I'll take care of the Fedora branch, is this issue to be backported to 1.12 branch as well?

@runcom

runcom commented Aug 24, 2016

Copy link
Copy Markdown
Collaborator

LGTM

@rhvgoyal

Copy link
Copy Markdown
Author

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.

@runcom

runcom commented Aug 24, 2016

Copy link
Copy Markdown
Collaborator

Sounds good

@mrunalp

mrunalp commented Aug 24, 2016

Copy link
Copy Markdown

LGTM

@rhvgoyal

Copy link
Copy Markdown
Author

@runcom, I don't think upstream is releasing this in 1.12. So we need to backport this fix for rhel/fedora 1.12

@runcom

runcom commented Sep 26, 2016

Copy link
Copy Markdown
Collaborator

@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?

@rhvgoyal

Copy link
Copy Markdown
Author

@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.

moby#24740

@runcom

runcom commented Sep 26, 2016

Copy link
Copy Markdown
Collaborator

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants