Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker APT repository binary has devicemapper "Udev Sync Supported: false" #10705

Closed
omribahumi opened this issue Feb 11, 2015 · 12 comments
Closed

Comments

@omribahumi
Copy link

We're still suffering from #4036 on 1.5, apparently because the docker binary is statically linked.

I understand the reasoning behind statically linking the executable, but as far as we're concerned, devicemapper without Udev Sync is unusable.

Any chance we can work around this somehow?
I tried compiling docker dynamically on Ubuntu 12.04 without much luck.

@unclejack
Copy link
Contributor

@omribahumi You might want to try to build a dynamic binary on Ubuntu 14.04 instead.

Having repositories with dynamically linked packages for individual distributions is being discussed.

@omribahumi
Copy link
Author

@unclejack I tried that, but I couldn't run it on 12.04. I think that the Udev Sync feature won't work properly if I'm using different copies/versions of libdevmapper.

I think we need a better solution here.

Perhaps @vbatts or @alexlarsson could shed some light on the possible solutions for making Udev Sync work without dynamic linking.
Why does this feature require dynamic linking?

@unclejack
Copy link
Contributor

@omribahumi I was suggesting that you actually try to use it on 14.04 after building it on 14.04. 12.04 also has older devicemapper libraries.

I've explained in #10664 why this doesn't work and why we need to disable devicemapper for the static binary:

This PR disables the building of the devicemapper graph driver for static Docker binaries.

As @vbatts has pointed out in #10195 and other PRs which are meant to fix #4036, devicemapper needs to allow udev to create the block device. However, statically linking in devicemapper doesn't make it possible for devicemapper to still be linked to udev. Not being able to use udev leads to udev racing with devicemapper, thus causing problems.

Disabling the building of devicemapper for static binaries is required. This won't affect distributions such as CentOS, RHEL, Fedora and others where dynamically linked Docker binaries are provided. 

Having devicemapper built in for statically linked Docker binaries doesn't make sense - we know for a fact issues will arise due to the lack of communication between devicemapper and udev.

The next step is to provide distribution specific package repositories and recommend specific drivers for certain distributions as needed.

Making the devicemapper library communicate properly with udev when statically linked into the binary is very unlikely to happen. Attempting to link devicemapper and the udev libraries statically would be an ugly hack which shouldn't be attempted because it's not going to be supported (by systemd's udev, by devicemapper), nor in any way portable from one udev version to another.

If devicemapper can't let udev handle device node creation, devicemapper will end up racing udev for device node creation, thus leading to the problems you've also run into.

@omribahumi
Copy link
Author

@unclejack Thanks for your feedback.
Well, I guess disabling devicemapper for static builds is one way of solving this.

@echeadle
Copy link

I tried building docker on 14.10 and it did not work. The message was Udev sync is not supported.

@hqhq
Copy link
Contributor

hqhq commented Mar 6, 2015

Same here, dynbinary on ubuntu 14.04 did not work.
docker info shows Udev Sync Supported: false

@vbatts
Copy link
Contributor

vbatts commented Mar 9, 2015

I just commented on this over here --> #4036 (comment)

The udev <--> libdevmapper logic is fairly recent in the life of the two projects.

@jbemmel
Copy link

jbemmel commented Apr 2, 2015

This page has a procedure that worked for me: http://sickbits.net/build-a-dynamically-linked-docker/

@thaJeztah
Copy link
Member

@vbatts @unclejack is there anything actionable here; is this a "documentation" issue, or should it be added to #11412?

@vbatts
Copy link
Contributor

vbatts commented Apr 6, 2015

Perhaps documentation on this process would be best. I will double check this process on ubuntu-12.04, but I documented here #4036 (comment) building docker for ubuntu 14.04 and getting udev sync supported.

As for users getting easy access to binaries downloadable from docker that will work for them, we're working on that, but it's not clean and straight forward yet.

@vbatts
Copy link
Contributor

vbatts commented Apr 6, 2015

ok. ubuntu-12.04 with a libdevmapper that supports sync will not be trivial.

If you are attempting to compile against the stock libdevmapper-dev, it is too old (1.02.48-4ubuntu7.4), and that version does not have a few require calls.

The only other option, I would not recommend. That would be to compile a newer version of libdevmapper (with configure proper flags), clobber the system libdevmapper (or make yourself a debian package ...), then build docker against this newer version. All bets are off for folks that care to attempt this...

Either upgrade to ubuntu-14.04 or switch to aufs.

@vbatts
Copy link
Contributor

vbatts commented Apr 6, 2015

@omribahumi I'm going to close this issue as devicemapper on ubuntu 12.04 will without udev sync support unless the box is installed in a "non-supported" way (clobbering system libraries).
It is known that udev sync false will cause #4036 issues.

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

No branches or pull requests

7 participants