https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Bug ID: 1026545 Summary: dockerinit fails with "libdevmapper.so.1.02: cannot open shared object file" Product: Fedora Version: 19 Component: docker-io Assignee: lsm5@redhat.com Reporter: sjenning@redhat.com QA Contact: extras-qa@fedoraproject.org CC: golang@lists.fedoraproject.org, lsm5@redhat.com, mattdm@redhat.com, mgoldman@redhat.com, vbatts@redhat.com
Description of problem: dockerinit fails with "libdevmapper.so.1.02: cannot open shared object file"
Version-Release number of selected component (if applicable): docker-io-0.7-0.12.dm.fc19.x86_64.rpm
How reproducible: Every time
Steps to Reproduce: 1. Install docker-io-0.7-0.12.dm.fc19.x86_64.rpm on F19 2. Download official ubuntu image 3. docker run ubuntu echo "hello world"
Actual results: /.dockerinit: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
Expected results: Get "hello world" output from ubuntu container
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #1 from Seth Jennings sjenning@redhat.com --- Got the RPM from http://lsm5.fedorapeople.org/rpmbuild/RPMS/x86_64/docker-io-0.7-0.12.dm.fc19...
Also ldd on /usr/bin/docker-init:
# ldd /usr/bin/docker-init linux-vdso.so.1 => (0x00007ffff97fe000) libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02 (0x0000003597e00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003597200000) libc.so.6 => /lib64/libc.so.6 (0x0000003596a00000) libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003598200000) libsepol.so.1 => /lib64/libsepol.so.1 (0x0000003599a00000) libudev.so.1 => /lib64/libudev.so.1 (0x000000359ae00000) /lib64/ld-linux-x86-64.so.2 (0x0000003596600000) libdl.so.2 => /lib64/libdl.so.2 (0x0000003596e00000) libpcre.so.1 => /lib64/libpcre.so.1 (0x0000003597a00000) librt.so.1 => /lib64/librt.so.1 (0x0000003598a00000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003598600000)
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #2 from Josh Poimboeuf jpoimboe@redhat.com --- Also related: bug 1017186 (can't compile dockerinit statically with go 1.1)
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Josh Poimboeuf jpoimboe@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexl@redhat.com
--- Comment #3 from Josh Poimboeuf jpoimboe@redhat.com --- Alex, can you comment on why docker-init requires libdevmapper? Is it for Docker-in-Docker?
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|dockerinit fails with |dockerinit fails with |"libdevmapper.so.1.02: |"libdevmapper.so.1.02: |cannot open shared object |cannot open shared object |file" |file" for Ubuntu container
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|dockerinit fails with |dockerinit fails with |"libdevmapper.so.1.02: |"libdevmapper.so.1.02: |cannot open shared object |cannot open shared object |file" for Ubuntu container |file"
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #4 from Lokesh Mandvekar lsm5@redhat.com --- just throwing it out there: this also occurs with centos and busybox containers
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #5 from Alexander Larsson alexl@redhat.com --- docker-init should not need libdevmapper. I don't know what branch this is build from. but the fixes for docker-init was on a different branch than the dm work unfortunately which lead to this. In general, the DM work is not yet landed, and is being reworked (again) upstream, including changing the on-disk layout. Trying to support the pre 0.7.0 releases is not really a good idea, lets finish this upstream first.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Matthew Miller mattdm@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pavel.nedr@gmail.com
--- Comment #6 from Matthew Miller mattdm@redhat.com --- *** Bug 1028670 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Raphaël Davaillaud rdavaillaud@hbs-research.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rdavaillaud@hbs-research.co | |m
--- Comment #7 from Raphaël Davaillaud rdavaillaud@hbs-research.com --- This occurs with the official centos 6 image, but not with quagbrain/centos5.9 image.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Tianon Gravi admwiggin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |admwiggin@gmail.com
--- Comment #8 from Tianon Gravi admwiggin@gmail.com --- This is a direct result of how the "docker-init" binary was created (non-static), and is one of several reasons why docker is distributed as a static binary. We do have a new build script that will build a separate static dockerinit however, and it is available by invoking "./hack/make.sh dynbinary" (designed specifically with packagers in mind).
So assuming you use a git revision that includes the "hack/make/dynbinary" file (which was commit 21161dbd515fb97cf9052a5980de6fc6180a89dc), you can replace the following build lines in your spec file: --- # passing version information build flags BZ #1017186 export LDFLAGS="-X main.GITCOMMIT %{shortcommit}/%{release} -X main.VERSION %{version} -w" go build -v -a -ldflags "$LDFLAGS" github.com/dotcloud/docker/docker go build -v -a -ldflags "$LDFLAGS" github.com/dotcloud/docker/docker-init
popd ---
With: --- popd
./hack/make.sh dynbinary ---
Then, the install lines: --- install -p -m 755 _build/docker %{buildroot}%{_bindir} install -p -m 755 _build/docker-init %{buildroot}%{_bindir} ---
With: --- install -d %{buildroot}%{_libexecdir}/docker install -p -m 755 bundles/$(cat VERSION)/dynbinary/docker-$(cat VERSION) %{buildroot}%{_bindir}/docker install -p -m 755 bundles/$(cat VERSION)/dynbinary/dockerinit-$(cat VERSION) %{buildroot}%{_libexecdir}/docker/dockerinit ---
This method will allow for building dockerinit statically, even while using Go 1.1.2.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution|--- |RAWHIDE Last Closed| |2013-11-19 16:25:27
--- Comment #9 from Lokesh Mandvekar lsm5@redhat.com --- 0.7-rc5 has been submitted to rawhide by vbatts
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #10 from Dave Lawrence dkl@mozilla.com --- The error still occurs for me running the new version:
[dkl@localhost ~]$ docker run -i -t centos bash /.dockerinit: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
RPM: http://koji.fedoraproject.org/koji/buildinfo?buildID=479658 docker-io-0.7-0.16.rc6.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #11 from Marek Goldmann mgoldman@redhat.com --- (In reply to Dave Lawrence from comment #10)
The error still occurs for me running the new version:
[dkl@localhost ~]$ docker run -i -t centos bash /.dockerinit: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory
This is reported in bug 1032884.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #12 from Marek Goldmann mgoldman@redhat.com --- Ignore my previous comment :)
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #13 from Marek Goldmann mgoldman@redhat.com --- I can confirm this issue. It seems it depends on the image we want to run. Fedora images work good, whereas centos image has issues:
Uploading context 10240 bytes Step 1 : FROM centos ---> 539c0211cd76 Step 2 : RUN yum -y install openssh-server ---> Running in a7fde642db8a /.dockerinit: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory Error build: The command [/bin/sh -c yum -y install openssh-server] returned a non-zero code: 127
I'm not sure if this is a docker-io package issue or the image itself.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #14 from Marek Goldmann mgoldman@redhat.com --- Forgot to mention that I use docker-io-0.7-0.13.dm.fc20.x86_64.
P.S. Sorry for the spam.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #15 from Vincent Batts vbatts@redhat.com --- Good to know. I was thinking it had something to do with the images. The latest builds of docker-io have a statically linked dockerinit. Until it gets promoted, you could try the builds from koji http://koji.fedoraproject.org/koji/buildinfo?buildID=479658 Similarly for the centos image. Perhaps just mockbuild --rebuild the srpm for a centos machine, and install that rpm for the image.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #16 from Dave Lawrence dkl@mozilla.com --- (In reply to Vincent Batts from comment #15)
Until it gets promoted, you could try the builds from koji http://koji.fedoraproject.org/koji/buildinfo?buildID=479658
Are you saying the rpm at the above links includes the newer staticly linked dockerinit, as that package still exhibits the same error for me? Or is there a new build coming through the system?
dkl
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #17 from Dave Lawrence dkl@mozilla.com --- (In reply to Dave Lawrence from comment #16)
(In reply to Vincent Batts from comment #15)
Until it gets promoted, you could try the builds from koji http://koji.fedoraproject.org/koji/buildinfo?buildID=479658
Are you saying the rpm at the above links includes the newer staticly linked dockerinit, as that package still exhibits the same error for me? Or is there a new build coming through the system?
dkl
Or maybe I do not understand properly how this works. Is the dockerinit injected into the container root at the time the container is created, or does the image that is downloaded from the docker registry already contain the dockerinit? If the latter, then is it that the centos image will need to be updated for it to work?
dkl
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |ASSIGNED Resolution|RAWHIDE |--- Keywords| |Reopened
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Michael Young m.a.young@durham.ac.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |m.a.young@durham.ac.uk
--- Comment #18 from Michael Young m.a.young@durham.ac.uk --- I believe docker is running within the container or at least load libraries from it (with docker-io-0.7-0.16.rc6.fc19.x86_64). I get the error /.dockerinit: error while loading shared libraries: libdevmapper.so.1.02: cannot open shared object file: No such file or directory when trying docker run mattdm/fedora-small /bin/echo hello world I do get "hello world" if I manually add /usr/lib64/libdevmapper.so.1.02 to the mattdm/fedora-small image, and I get the corresponding "error while loading shared libraries" error if I manually move libsqlite3.so.0 out of the way, similarly for libpcre.so.1 .
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
dan-fedora@drown.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dan-fedora@drown.org
--- Comment #19 from dan-fedora@drown.org --- Created attachment 828465 --> https://bugzilla.redhat.com/attachment.cgi?id=828465&action=edit dockerinit build process fix
The problem was that /usr/bin/docker was built with the flag utils.IAMSTATIC, which made it map itself on /.dockerinit in the LXC. Attached is a patch to the spec file (applied to http://koji.fedoraproject.org/koji/buildinfo?buildID=480402) to not set IAMSTATIC on /usr/bin/docker, and also to set utils.INITSHA1 to the SHA1 of /usr/libexec/docker/dockerinit
I've disabled __os_install_post's binary modification steps, as that interferes with docker's SHA1 check.
Which this patch, I can run a CentOS in docker on Fedora: # cat /etc/redhat-release ; docker run -rm=true centos cat /etc/redhat-release Fedora release 19 (Schrödinger’s Cat) CentOS release 6.4 (Final)
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #20 from Dave Lawrence dkl@mozilla.com --- (In reply to dan-fedora from comment #19)
Created attachment 828465 [details] dockerinit build process fix
I can verify that the above patch fixes the issue for me.
dkl
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #21 from Marek Goldmann mgoldman@redhat.com --- +1 This patch fixes the issue for me too.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #22 from Vincent Batts vbatts@redhat.com --- cool. I'm working it through the dists, and will push it out shortly.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Vincent Batts vbatts@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|lsm5@redhat.com |vbatts@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |MODIFIED
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #23 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7-0.20.rc7.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7-0.20.rc7.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Viacheslav Dubrovskiy dubrsl@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dubrsl@gmail.com
--- Comment #24 from Viacheslav Dubrovskiy dubrsl@gmail.com --- +1 Yes it helped.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #25 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7-0.20.rc7.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7-0.20.rc7.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #26 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7-0.20.rc7.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7-0.20.rc7.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Lokesh Mandvekar lsm5@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |RAWHIDE Last Closed|2013-11-19 16:25:27 |2013-11-25 12:48:02
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|pedro@algarvio.me |
--- Comment #27 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-2.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7.0-2.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #28 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-6.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7.0-6.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #29 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-6.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7.0-6.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #30 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-9.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7.0-9.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #31 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-9.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7.0-9.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #32 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-9.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7.0-9.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #33 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-10.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7.0-10.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #34 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-10.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7.0-10.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #35 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-10.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7.0-10.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #36 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-12.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7.0-12.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #37 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-12.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7.0-12.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #38 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-12.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7.0-12.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #39 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.fc20
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #40 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.fc19
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
--- Comment #41 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/docker-io-0.7.0-14.el6
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version| |docker-io-0.7.0-14.el6 Resolution|RAWHIDE |ERRATA
--- Comment #42 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|docker-io-0.7.0-14.el6 |docker-io-0.7.0-14.fc19
--- Comment #43 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
https://bugzilla.redhat.com/show_bug.cgi?id=1026545
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed In Version|docker-io-0.7.0-14.fc19 |docker-io-0.7.0-14.fc20
--- Comment #44 from Fedora Update System updates@fedoraproject.org --- docker-io-0.7.0-14.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
golang@lists.fedoraproject.org