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 provisioner not working #27

Closed
devinrsmith opened this issue Apr 30, 2015 · 8 comments
Closed

docker provisioner not working #27

devinrsmith opened this issue Apr 30, 2015 · 8 comments

Comments

@devinrsmith
Copy link

$ vagrant up
Bringing machine 'default' up with 'linode' provider...
==> default: Creating a new linode...
==> default: Created a new linode... 983298
==> default: Booting Linode 983298 ...
==> default: Assigned IP address: 45.56.122.235
==> default: Creating user account: dev...
==> default: Rsyncing folder: /Users/dsmith/vagrant/linodetest/ => /vagrant...
==> default: Running provisioner: docker...
    default: Installing Docker (latest) onto machine...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`

Stdout from the command:

Reading package lists...
Building dependency tree...
Reading state information...


Stderr from the command:

stdin: is not a tty
modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/3.19.1-x86_64-linode53/modules.dep.bin'
E: Unable to locate package linux-image-extra-3.19.1-x86_64-linode53
E: Couldn't find any package by regex 'linux-image-extra-3.19.1-x86_64-linode53'
@displague
Copy link
Owner

Linode doesn't include AUFS in kernels. Alternate solutions are noted on the tubes:

If you need help getting it going I'd be happy to assist if you can share some of your Vagrantfile.

@displague
Copy link
Owner

The line that attempts to install the linux-image-extra packages is only doing so because the Linode kernel doesn't have AUFS. This would never work because the kernel revision includes linode in the name and there is no Debian kernel package matching that pattern.

Linode kernels are built with most everything compiled in -- no modules. Linode does not provide additional modules, however, the build environment (dmesg | grep gcc) and kernel config (zcat /proc/config.gz) could be used to generate your own kernel modules (AUFS). A far more popular choice is to use the pvgrub option as mentioned in the links above.

@devinrsmith
Copy link
Author

I think the docker issues you are bring up are outdated, although I might be wrong.

https://blog.docker.com/2013/11/docker-0-7-docker-now-runs-on-any-linux-distribution/

I've had docker running on stock linode kernels (debian 7 / 8).

(curl -sSL https://get.docker.com/ | sh works for the lazy)

dev@debian:~$ docker -v
Docker version 1.6.0, build 4749651
dev@debian:~$ uname -a
Linux debian 3.19.1-x86_64-linode53 #1 SMP Tue Mar 10 15:30:28 EDT 2015 x86_64 GNU/Linux

@displague
Copy link
Owner

https://github.com/docker/docker/blob/5728426f27eac479ffbb58bf886721fd84b9425f/hack/install.sh is more complicated than

lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`

That apt-get install line will never work on Linode because there is no matching Debian package for a Linode specific kernel. I think PVGrub or an more flexible docker install method will be your best bet.

@devinrsmith
Copy link
Author

Agreed.

But it is possible to install docker on stock linode (uses device-mapper instead of AUFS).

Does the lsmod | grep aufs ... command live under the control of displague/vagrant-linode?

@displague
Copy link
Owner

It does not.

@displague
Copy link
Owner

I confirmed that the problem is with https://github.com/mitchellh/vagrant/blob/master/plugins/provisioners/docker/cap/debian/docker_install.rb#L13 -- adding a || true at the end of the sudo fixes it. I've mentioned this in hashicorp/vagrant#5697 but this may need its own issue.

I also ran into this one while trying to use the Docker provisioner: hashicorp/vagrant#5245

@displague
Copy link
Owner

I'm closing this since the problem is definitely upstream. Thanks!

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

2 participants