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

Gentoo #313

Closed
tianon opened this issue Apr 2, 2013 · 92 comments
Closed

Gentoo #313

tianon opened this issue Apr 2, 2013 · 92 comments

Comments

@tianon
Copy link
Member

tianon commented Apr 2, 2013

A nice ebuild/support for Gentoo would be a great feature. Gentoo users are usually willing to try new things, especially fun ones like Docker.

@lucractius was told to create a ticket, but never did (that I could find), so here we have it. :)

@techdragon
Copy link

Thanks for making this for me. Been so flat out over the last few days.
The make file / source instructions don't look too onerous so I'll have to take a peek & see if I can get a rudimentary eBuild cobbled together and up into my Layman Repository.

@tianon
Copy link
Member Author

tianon commented Apr 2, 2013

My own simple first attempt:

EAPI=4

DESCRIPTION="Docker complements LXC with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers."
HOMEPAGE="http://www.docker.io/"
SRC_URI="https://github.com/dotcloud/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""

DEPEND="
    dev-lang/go
"
RDEPEND="
    app-emulation/lxc
    app-arch/libarchive
    net-misc/curl
"

src_install() {
    dobin bin/docker
}

@tianon
Copy link
Member Author

tianon commented Apr 2, 2013

I guess it would also be helpful to mention that I called this "app-emulation/docker" and put that in docker-0.1.1.ebuild (to grab from the most recent "release" tag to avoid the annoyance of a live ebuild).

@tianon
Copy link
Member Author

tianon commented Apr 2, 2013

I'm also thinking that dobin might be better as dosbin, since docker does have to be run as root. I'd definitely love some outside opinions.

@tianon
Copy link
Member Author

tianon commented Apr 2, 2013

I've also added the following to the end of the ebuild (referencing issue #219), since this is probably the first issue Gentoo users will run into (even before a misconfigured kernel for LXC):

pkg_postinst() {
    ewarn "Docker currently assumes a network bridge named lxcbr0 exists and is usable"
    ewarn "see also https://github.com/dotcloud/docker/issues/219"
}

The best temporary solution I can see for the ebuild to do would be to create something similar to the lxcbr0 from Ubuntu (and if named differently, which is probably a good idea, perform the tiny patch necessary to network.go -- something like dockerbr0 would be more obvious). The real solution, of course, is the actual resolution of #219, especially since reliably creating said bridge at install-time would pose somewhat of a challenge (from what I know).

@tianon
Copy link
Member Author

tianon commented Apr 3, 2013

As a side note, since the final resolution to the bridge issue will either be #221 or will be similar to it, we will need to add net-misc/bridge-utils (for /sbin/brctl) to RDEPEND. I think RDEPEND also ought to include sys-apps/iproute2 (for /bin/ip).

@tianon
Copy link
Member Author

tianon commented Apr 3, 2013

Sorry for waxing slightly spammy in comment volume here; I am very excited about getting this to work, and do enjoy practice making ebuilds since I have so few legitimate opportunities to do so. Here is an updated ebuild that can be either docker-0.1.1 or docker-9999 (yes, finally a proper live ebuild):

EAPI=4

DESCRIPTION="Docker complements LXC with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers."
HOMEPAGE="http://www.docker.io/"

if [[ ${PV} == *9999 ]]; then
    EGIT_REPO_URI="git://github.com/dotcloud/docker.git"
    inherit git-2
    SRC_URI=""
    KEYWORDS=""
else
    SRC_URI="https://github.com/dotcloud/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
    KEYWORDS="~amd64"
fi

LICENSE="Apache-2.0"
SLOT="0"
IUSE=""

DEPEND="
    dev-lang/go
"
RDEPEND="
    app-arch/libarchive
    app-emulation/lxc
    net-misc/bridge-utils
    net-misc/curl
    sys-apps/iproute2
"

src_install() {
    dobin bin/docker
    dodoc README.md
    [[ ${PV} == *9999 ]] && dodoc CONTRIBUTING.md
}

pkg_postinst() {
    ewarn "Docker currently assumes a network bridge named lxcbr0 exists and is usable."
    ewarn "See https://github.com/dotcloud/docker/issues/219 for more details."
}

I have also included here the runtime dependencies of net-misc/bridge-utils and sys-apps/iproute2, mostly so that I don't forget to add them later when the bridge issue is finally resolved nicely.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

We just barely got a v0.1.2 tag, but since it now uses git directly in the Makefile (to include GIT_COMMIT in the build for nice versioning information), I've updated the ebuild to just always use the git-2 eclass instead of only doing so for live ebuilds:

EAPI=4

DESCRIPTION="Docker complements LXC with a high-level API which operates at the process level. It runs unix processes with strong guarantees of isolation and repeatability across servers."
HOMEPAGE="http://www.docker.io/"
SRC_URI=""

EGIT_REPO_URI="git://github.com/dotcloud/docker.git"
if [[ ${PV} == *9999 ]]; then
    KEYWORDS=""
else
    EGIT_COMMIT="v${PV}"
    KEYWORDS="~amd64"
fi

inherit git-2

LICENSE="Apache-2.0"
SLOT="0"
IUSE=""

DEPEND="
    dev-lang/go
"
RDEPEND="
    app-arch/libarchive
    app-emulation/lxc
    net-misc/bridge-utils
    net-misc/curl
    sys-apps/iproute2
"

src_install() {
    dobin bin/docker
    dodoc README.md
    [[ ${PV} == *9999 ]] && dodoc CONTRIBUTING.md
}

pkg_postinst() {
    ewarn "Docker currently assumes a network bridge named lxcbr0 exists and is usable."
    ewarn "See https://github.com/dotcloud/docker/issues/219 for more details."
}

Should still be saved as either app-emulation/docker/docker-0.1.2.ebuild or app-emulation/docker/docker-9999.ebuild.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

I've created a public gentoo-overlay repo for me to do further development on this in so that it will be publicly accessible and simpler for others to see, use, and contribute to.

https://github.com/tianon/gentoo-overlay/tree/master/app-emulation/docker

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

I finally created lxcbr0 manually to test further, and now we run into a "no such device" error in docker.go on line 40. This is one issue with just bubbling errors up and logging them at the top level. :)

Full output:

$ sudo docker run -i -t busybox /bin/echo hi
2013/04/03 22:57:16 docker run -i -t busybox /bin/echo hi
2013/04/03 22:57:16 no such device

And again with debugging enabled, in case that helps:

$ sudo docker -D run -i -t busybox /bin/echo hi
[debug] runtime.go:228 Loaded container 000681152368dacad8351b0872a120dd3fe3795f769b15b3bdf5e5fb6d644611
[debug] runtime.go:228 Loaded container 0a9d888ebaf63c8e2e113dd168d725aba90e9cdcf5464cfd6d304af81561bb8c
[debug] runtime.go:228 Loaded container 0e0284b89613110251a73a3bfcf77c957c557d77eed0eb4e70ee641ce5839ae2
[debug] runtime.go:228 Loaded container 4a88d53f08f444a82ae288c94c0b1e5edc94d01154d6baadf5cb23c996ab43ea
[debug] runtime.go:228 Loaded container 7ccaea4b9ea365719d3a46b2ee8bf060d687846d95fa50c82508fee1c51d8ed7
[debug] runtime.go:228 Loaded container 94aa0f18895b32c371eb53fb224b0d9141289d2b585a91d001e74770644731ff
[debug] runtime.go:228 Loaded container 9c0e938500c490c6c0833cf1566c518ac1b3fe2c2fb5cb3c303844a9d0ec0293
[debug] runtime.go:228 Loaded container a0189933ee35cd3e6c4a9e77b96e277a6fe1eaf88e4d7b47d935f4c4b76061b2
[debug] runtime.go:228 Loaded container a82ee39acb546157408039ee5a8cfa4a7794eeb7a7d5eb8341f2bd2ca9417d8c
[debug] runtime.go:228 Loaded container ae55d007d67b8206888f7149cdc07e639a4d8a1886f80251818a88e29ddd6867
[debug] runtime.go:228 Loaded container aee5a3ca5df8f847f4d8225ec1f4dba7bae15e25c45d7e352066528e60dd3ee1
[debug] runtime.go:228 Loaded container bc56765217f1600f5bad4b8560a94277ae2dbdb4fcb37ba5c3b1867590f04045
[debug] runtime.go:228 Loaded container e0a245fab6891d2b528eb4b36cf2b05f40b30256a82fa20816f633942d49b187
[debug] runtime.go:228 Loaded container e44ecacce56ab96028a933fb740ca700fe8465e40a9d16a8aaf51f68819b0738
[debug] runtime.go:228 Loaded container f2d38dc45945665892c6f5cf93aa5e8359f72fc66008e189f361e78b67498463
2013/04/03 22:57:37 docker run -i -t busybox /bin/echo hi
[debug] commands.go:917 Starting

[debug] container.go:271 [start] attach stdin

[debug] container.go:291 [start] attach stdout

[debug] container.go:308 [start] attach stderr

[debug] container.go:328 Waiting for job 1/3

2013/04/03 22:57:37 no such device

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

I should also mention that I am proficient in Go and happy to debug this with some help, but I just don't know enough about LXC or Docker at this point to go much further on my own.

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

Hi Tianon, this "no such device" is because you don't have the aufs module
loaded in your kernel. See issue #183.

On Wed, Apr 3, 2013 at 10:00 PM, Tianon Gravi notifications@github.comwrote:

I should also mention that I am proficient in Go and happy to debug this
with some help, but I just don't know enough about LXC or Docker at this
point to go much further on my own.


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15879995
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Ah brilliant, thanks. Sorry, I should've thought to search the issues here. I'll play around with that and see about adding a check for that in the ebuild, too (I know it can be done, just haven't done it myself before).

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

No worries. You hit 2 completely unrelated errors in a row, and they
happened to both say "no such device". I can't blame you for being confused
:)

On Wed, Apr 3, 2013 at 10:04 PM, Tianon Gravi notifications@github.comwrote:

Ah brilliant, thanks. Sorry, I should've thought to search the issues
here. I'll play around with that and see about adding a check for that in
the ebuild, too (I know it can be done, just haven't done it myself before).


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15880057
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Indeed, very fun. :)

Adding aufs to the ebuild turns out to be much easier than I was thinking. I thought it was a built-in kernel FS, but it's in a separate package, so I just need to add sys-fs/aufs3 to RDEPEND.

The nasty part is that the aufs ebuild requires patching the kernel, so maybe Gentoo won't be one of the first "supported" distros outside of Ubuntu - we'll just make sure that for the experienced Gentoo user, it'll at least be possible. :)

It's really a choice between the aufs3 ebuild with a patch to the kernel, or using the aufs-sources directly, which are basically gentoo-sources, but including the aufs code. We'll see what I run into next after getting aufs installed and working.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Now we've made progress. Kernel recompiled and rebooted, aufs successfully loaded.

After running sudo docker run -i -t busybox /bin/echo hi, I get:

2013/04/03 23:42:20 docker run -i -t busybox /bin/echo hi

Then it hangs for a short while (which I'm assuming is some initial setup, since the hang here didn't happen on subsequent runs), then I got:

hi

So docker actually created and ran my container!

Then we hang until I press a key of some kind and we get:

2013/04/03 23:43:33 io: read/write on closed pipe

Obviously this is because the process is dead, but for some reason our attachment didn't know it. Maybe I've misunderstood either -i or -t?

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

Nice!

Did you run the first "docker run" on an virgin docker install? If so, the
delay was probably docker auto-downloading the busybox image from the
registry :)

On Wed, Apr 3, 2013 at 10:50 PM, Tianon Gravi notifications@github.comwrote:

Now we've made progress. Kernel recompiled and rebooted, aufs successfully
loaded.

After running sudo docker run -i -t busybox /bin/echo hi, I get:

2013/04/03 23:42:20 docker run -i -t busybox /bin/echo hi

Then it hangs for a short while (which I'm assuming is some initial setup,
since the hang here didn't happen on subsequent runs), then I got:

hi

So docker actually created and ran my container!

Then we hang until I press a key of some kind and we get:

2013/04/03 23:43:33 io: read/write on closed pipe

Obviously this is because the process is dead, but for some reason our
attachment didn't know it. Maybe I've misunderstood either -i or -t?


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15881034
.

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

On Wed, Apr 3, 2013 at 10:50 PM, Tianon Gravi notifications@github.comwrote:

Then we hang until I press a key of some kind and we get:2013/04/03
23:43:33 io: read/write on closed pipe

Obviously this is because the process is dead, but for some reason our
attachment didn't know it. Maybe I've misunderstood either -i or -t?

This is a bug which was introduced in the last 24 hours... We are currently
fixing it. The correct behavior would be for docker to return on its own.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

I'm not sure what the delay was, since I had already pulled the busybox image, but it's certainly cool to be this far. I'm currently waiting for the ubuntu base image to download so I can play with that, too. :)

So overall, Gentoo appears to be just fine as a platform, once we get the bridge figured out more nicely and now that we've got the dependencies nailed down correctly. 👍

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

Next step: publish a standard guest Gentoo image, so we non-gentoo users
can experiment with it inside docker? :) 'docker run -i -t gentoo bash'
would be pretty cool.

On Wed, Apr 3, 2013 at 10:58 PM, Tianon Gravi notifications@github.comwrote:

I'm not sure what the delay was, since I had already pulled the busybox
image, but it's certainly cool to be this far. I'm currently waiting for
the ubuntu base image to download so I can play with that, too. :)

So overall, Gentoo appears to be just fine as a platform, once we get the
bridge figured out more nicely and now that we've got the dependencies
nailed down correctly. [image: 👍]


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15881195
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

More output from the base image:

sudo docker run -i -t base /bin/bash
Password: 
2013/04/04 00:01:24 docker run -i -t base /bin/bash
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
groups: cannot find name for group ID 11
root@64b98c5e6e37:/#

With an active, working bash terminal inside the image. :)

Having a Gentoo image would indeed be very nice. Not entirely sure how to go about creating such a thing, but I might look into it later (probably looking at that nice script that generates the busybox image to help me figure out what I'm doing).

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

You can create a new image from a tarball with 'docker import'.

For example, if "rootfs" containers a full root filesystem: 'tar -C
./rootfs -c . | docker import tianon/gentoo' then 'docker run -i -t
tianon/gentoo bash'.

On Wed, Apr 3, 2013 at 11:04 PM, Tianon Gravi notifications@github.comwrote:

More output from the base image:

sudo docker run -i -t base /bin/bash
Password:
2013/04/04 00:01:24 docker run -i -t base /bin/bash
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
groups: cannot find name for group ID 11
root@64b98c5e6e37:/#

With an active, working bash terminal inside the image. :)

Having a Gentoo image would indeed be very nice. Not entirely sure how to
go about creating such a thing, but I might look into it later (probably
looking at that nice script that generates the busybox image to help me
figure out what I'm doing).


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15881298
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Hmm, that base image doesn't have internet, so I'm pretty much positive my lxcbr0 is not setup correctly, which is odd since I followed the same steps in the pull request that's trying to normalize all that.

Here's what I did:

sudo brctl addbr lxcbr0
sudo ip addr add 172.16.0.1/24 dev lxcbr0
sudo ip link set lxcbr0 up
sudo iptables -t nat -A POSTROUTING -s 172.16.0.1/24 '!' -d 172.16.0.1/24 -j MASQUERADE

Learning about how docker import works, we might be able to use a stage3 directly. That would be magical and mind-blowing. I'm definitely going to have to play with that more.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Fyi, those steps were specifically from https://github.com/dotcloud/docker/pull/221/files#L3R457 (the CreateIface function). If they aren't right or aren't sufficient, then that pull request definitely needs more loving. :)

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

Just to double-check, can you confirm ip routing to the outside is broken,
and not just dns?

On Wednesday, April 3, 2013, Tianon Gravi wrote:

Fyi, those steps were specifically from
https://github.com/dotcloud/docker/pull/221/files#L3R457 (the CreateIface
function). If they aren't right or aren't sufficient, then that pull
request definitely needs more loving. :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15881552
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

I always verify connectivity with a ping to 8.8.8.8 before I ever try google.com. :P

@shykes
Copy link
Contributor

shykes commented Apr 4, 2013

I assumed so - but had to ask! :)

On Wednesday, April 3, 2013, Tianon Gravi wrote:

I always verify connectivity with a ping to 8.8.8.8 before I ever try
google.com. :P


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-15881805
.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Understand completely. :)

Also, ifconfig lxcbr0 host-side gives me 172.16.0.1 (as it should), and ifconfig eth0 base-side gives me 172.16.0.2 (which is expected), and ping -c 1 172.16.0.1 base-side succeeds nicely, as does ping -c 1 172.16.0.2 host-side.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

To further muddy the waters of this conversational thread, here's some output from my initial attempt at pushing the Gentoo stage3 into a docker image:

2013/04/04 00:34:57 docker run -i -t tianon/gentoo bash
lxc-start: No such file or directory - failed to mount 'devpts' on '/usr/lib/lxc/rootfs//dev/pts'
lxc-start: failed to setup the mount entries for '4a7a675d27bde40380f6c7e475301b46f55e2393e0df2b9b31c3999c1e8dda45'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn '4a7a675d27bde40380f6c7e475301b46f55e2393e0df2b9b31c3999c1e8dda45'

And for completeness, the full steps performed to create said image:

wget -c 'http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3/default/20130321/stage3-amd64-20130321.tar.bz2'
mkdir rootfs
# basically following the Gentoo Handbook from here to get our initial chroot environment setup (which should be sufficient for a docker image, too, in theory)
(cd rootfs && sudo tar xvjpf ../stage3-amd64-20130321.tar.bz2)
sudo vim rootfs/etc/portage/make.conf # just to verify CFLAGS/CXXFLAGS and add GENTOO_MIRRORS and SYNC as per the handbook -- not strictly necessary just to get a working chroot environment
sudo vim rootfs/etc/resolv.conf # to add nameservers -- also not strictly necessary for a "working" chroot environment
sudo tar -C rootfs -c . | sudo docker import - tianon/gentoo

I suppose I really ought to go look at that example script and make sure I'm not missing something important that makes a docker image different from the stage3 I've created.

@tianon
Copy link
Member Author

tianon commented Apr 4, 2013

Could it be the fact that the stage3 dev is not empty, and thus wouldn't like being mounted on top of without force? Any other directories that might have similar issues? Are dev, proc, and sys mounted by docker/lxc directly?

@tianon
Copy link
Member Author

tianon commented Apr 15, 2013

Ah, interesting article, thanks. lxc warns me for not having it as well, but like I said, docker still has no issues with running containers. It looks like that's probably more for running containers as a non-root host user and still having root inside the container, where docker just runs everything as root on the host.

I'll definitely keep my eye on this, and probably add some more einfo text to my docker ebuild about it. Thanks very much for the information about how far you had to go to get it enabled.

@tianon
Copy link
Member Author

tianon commented Apr 21, 2013

With the latest version (baacae8), I'm getting the following error when I try to start up the daemon:

2013/04/21 15:28:19 strconv.ParseInt: parsing "gentoo": invalid syntax

I would guess that this is related to the new kernel version checking code, but don't know for sure. In case it helps, the output of uname -r is 3.8.8-gentoo.

@shykes
Copy link
Contributor

shykes commented Apr 21, 2013

Yes, I think your diagnostic is correct. I'll look into it.

On Sun, Apr 21, 2013 at 2:32 PM, Tianon Gravi notifications@github.comwrote:

With the latest version (baacae8baacae8345),
I'm getting the following error when I try to start up the daemon:

2013/04/21 15:28:19 strconv.ParseInt: parsing "gentoo": invalid syntax

I would guess that this is related to the new kernel version checking
code, but don't know for sure. In case it helps, the output of uname -ris
3.8.8-gentoo.


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-16746821
.

@tianon
Copy link
Member Author

tianon commented Apr 21, 2013

More exactly, I'd think it's on line 437 of utils.go, since my "specific" version is literally the string 'gentoo'.

@tianon
Copy link
Member Author

tianon commented Apr 21, 2013

I think a reasonable fix would probably be to convert that "Specific" struct field into a string. If this is an acceptable solution and if it were helpful for me to do so, I'd be happy to submit a pull request for it (including fixing the necessary tests and possibly adding one or two more for testing some non-integer specific values).

@shykes
Copy link
Contributor

shykes commented Apr 21, 2013

That sounds reasonable to me. A few notes:

  • You'll have to fix CompareKernelVersion, since it currently assumes
    Specific is an int which can be used to refine comparison. The best thing
    to do might be to attempt parsing it as an int in CompareKernelVersion, and
    just skip that part of the comparison if the parsing fails.
  • Maybe "Flavor" would be a more appropriate term than "Specific"? Is there
    an official term for this part of the version in Linux terminology?

Thanks for offering a PR. I will gladly accept it :)

On Sun, Apr 21, 2013 at 3:47 PM, Tianon Gravi notifications@github.comwrote:

I think a reasonable fix would probably be to convert that "Specific"
struct field into a string. If this is an acceptable solution and if it
were helpful for me to do so, I'd be happy to submit a pull request for it
(including fixing the necessary tests and possibly adding one or two more
for testing some non-integer specific values).


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-16748079
.

@tianon
Copy link
Member Author

tianon commented Apr 21, 2013

Thanks for the pointers. I looked to Wikipedia to verify my memory on the subject of that fourth bit, and it has the following to say most recently about it (Linux kernel#Version numbering):

Also, sometimes the version will have a suffix such as 'tip', indicating another development branch, usually (but not always) the initials of a person who made it. For example, 'ck' stands for Con Kolivas, 'ac' stands for Alan Cox, etc. Sometimes, the letters are related to the primary development area of the branch the kernel is built from, for example, 'wl' indicates a wireless networking test build. Also, distributors may have their own suffixes with different numbering systems and for back-ports to their "enterprise" (i.e. stable but older) distribution versions.

It was originally used as a security update, bugfix, and patch bump number, but Torvalds deprecated that (as of 3.0) in favor of using the third digit for that and using the suffix for any build-specific information (in this case, gentoo). Since we don't ever compare against that final part, and only use this function to verify that we've got at least 3.8.0, wouldn't it be better if CompareKernelVersion just ignored that bit for now, since even if it is a number, it's not guaranteed to be comparable to other distributions or builds of the kernel? If it turns out that, for example, only certain gentoo kernels end up having odd issues, then it seems like it would at that point make more sense to compare directly against k.Specific (or k.Flavor which I quite like) being "gentoo" and finally comparing the kernel version to see if it's one of the problem versions?

@tianon
Copy link
Member Author

tianon commented Apr 21, 2013

Oh, and as for official verbiage, "suffix" is the best I can find/tell, so it would seem that Flavor is as good a name as any, since that's basically what it describes.

@shykes
Copy link
Contributor

shykes commented Apr 22, 2013

Sounds good to me. Let's drop it from the comparison then.

Thanks!

On Sun, Apr 21, 2013 at 4:48 PM, Tianon Gravi notifications@github.comwrote:

Oh, and as for official verbiage, "suffix" is the best I can find/tell, so
it would seem that Flavor is as good a name as any, since that's basically
what it describes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/313#issuecomment-16748995
.

@tianon
Copy link
Member Author

tianon commented Apr 22, 2013

Onward and upward. As you can see, pull request submitted; now we have a new error:

2013/04/21 19:23:01 cgroup mountpoint not found

(This is preceded by the contents of the output of the mount command.)

Here's some (hopefully) relevant mount output:

$ mount | grep cgroup
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
devices on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

@pwaller
Copy link
Contributor

pwaller commented Apr 22, 2013

Quick update on aufs3 + CONFIG_USER_NS on gentoo, it's now fixed in sys-kernel/aufs-sources-3.8.8-r1.

@tianon
Copy link
Member Author

tianon commented Apr 23, 2013

That's definitely good news. I also want to report that the cgroup fix yesterday solved my issue, and I'm successfully starting the docker daemon again and running images. I'm in the process of fixing the tianon/gentoo image so I can push up a new (fixed) image that includes /bin/ip, and will update the "public docker images" wiki page again when I have the new version working and pushed up.

@tianon
Copy link
Member Author

tianon commented Apr 23, 2013

The tianon/gentoo image is fixed and uploaded, and the public docker images page is updated to reflect that and the remaining caveats of the image (namely, that it does not include a copy of the portage tree, since that can get pretty large and quickly goes stale).

@tianon
Copy link
Member Author

tianon commented Apr 23, 2013

Oh, and I also updated the ebuild in my overlay to copy a few of the files from the contrib directory into /usr/share/, as is the convention with several other packages (mostly just the stuff that is currently widely useful directly or as a reference, or will be in the future such as the vagrant directory).

@tianon
Copy link
Member Author

tianon commented Apr 23, 2013

I felt like having a little more fun with ebuilds this evening, so I created a companion ebuild for app-emulation/docker-bin that installs the official docker-v0.1.8.tgz binary. The main benefit for this that I can see (beyond the obvious bug narrowing down we get from an official "gold" binary) is that it doesn't require dev-lang/go to be installed to build it, which could be a plus on a micro server without a lot of resources or space (which does beg the question of why one would want docker on it, but I digress).

I think it's also worth mentioning that both of these ebuilds are 64bit only, as is docker itself (for the time being, as noted in #136, which decision I fully support and applaud for the focus it helps provide in the short term).

@tianon
Copy link
Member Author

tianon commented Apr 24, 2013

In reference to the "official package name" discussion on #406, on Gentoo we only have a conflict with just calling the package "docker" if there's another package in the same category with said name (since the package name is really "app-emulation/docker"). Would you guys prefer it be "app-emulation/lxc-docker" to match the other platforms, or keep the simple "docker" name because we can? :)

@tianon
Copy link
Member Author

tianon commented Apr 24, 2013

The similarly named package is "x11-plugins/docker", which does cause a little confusion, especially if one doesn't specify the category when installing. I think my vote is on matching the other platforms, both for consistency and for clarity.

@shykes
Copy link
Contributor

shykes commented Apr 24, 2013

Yeah +1 for matching other platforms.

Thanks!

@solomonstre
@getdocker

On Wed, Apr 24, 2013 at 7:16 AM, Tianon Gravi notifications@github.com
wrote:

The similarly named package is "x11-plugins/docker", which does cause a little confusion, especially if one doesn't specify the category when installing. I think my vote is on matching the other platforms, both for consistency and for clarity.

Reply to this email directly or view it on GitHub:
#313 (comment)

@tianon
Copy link
Member Author

tianon commented Apr 24, 2013

So on other platforms, the binary is being installed as "docker" (as it is generated in the code). Is the init script also "docker" to match the binary, or is it "lxc-docker" to match the package name?

@tianon
Copy link
Member Author

tianon commented Apr 29, 2013

I decided to answer my own question since I realized that I have "ubuntu" (inside Docker, of course). I had to go add the universe repo to the ubuntu image (as well as the PPA), but after getting it installed, found that the upstart script is indeed called "docker", and so Gentoo's will stay that way as well. 👍

@eliasp
Copy link
Contributor

eliasp commented Jun 14, 2013

As it seems that auto-referencing this issue from #490 a 2nd time didn't work, here's a copy of my last message:

Now, that most distributions make use of systemd, what about simply providing a corresponding sysctl.d file to enable IP forwarding?

/usr/lib/sysctl.d/docker-ip-forwarding.conf

net.ipv4.ip_forward = 1

Then the few remaining distributions which don't provide support for systemd (yet) would only have to actually take care about dealing with this.

Regarding issue #313: The current Gentoo policy for installing systemd files is: they're always installed, independent from USE=systemd. For now this file could be shipped from $FILESDIR, once docker provides it itself, it can be dropped from $FILESDIR. A corresponding einfo what to do in case systemd is not used should only be displayed in case of USE=-systemd.

@shykes
Copy link
Contributor

shykes commented Aug 13, 2013

Hey guys, I'm going over old issues to keep the list under control.

Since I believe there is an ebuild, should we perhaps close this? If there are still specific problems which haven't been fixed in the last 4 months, at this point I suggest creating a fresh actionable issue for each.

Closing tentatively, I will gladly re-open if I'm missing something.

@shykes shykes closed this as completed Aug 13, 2013
@tianon
Copy link
Member Author

tianon commented Aug 13, 2013

Sounds good to me; thanks @shykes.

@tianon
Copy link
Member Author

tianon commented Aug 26, 2013

Just as a reference for those following along at home (or work!), I've moved the lxc-docker ebuilds out of my personal overlay and into a dedicated docker-overlay: https://github.com/tianon/docker-overlay

@ghost
Copy link

ghost commented Dec 7, 2014

RIP

thaJeztah added a commit to thaJeztah/docker that referenced this issue Aug 8, 2019
…ch_but_it_was_busted

[19.03 backport] use GO_VERSION and pin to debian stretch
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

No branches or pull requests

7 participants