-
-
Notifications
You must be signed in to change notification settings - Fork 792
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
Cannot run container on new nodes #49
Comments
Could you paste or Gist your full Chef run log? I'd also like to see your docker_image and docker_container resources please. Thanks! |
Here's the Chef run log (w/ a few bits redacted for security reasons): https://gist.github.com/cap10morgan/175c4fb1fdfde8768f43 docker_image resource: docker_image 'registry' docker_container resource: docker_container 'registry' do
detach true
port '5000:5000'
env ['SETTINGS_FLAVOR=prod']
volume ['/mnt/docker-registry-storage:/tmp/registry', '/mnt/docker-registry-config:/docker-registry/config']
end |
Awesome, thank you very much. I'll look deeper and see what I can't find. On Tue, Jan 28, 2014 at 12:45 PM, Wes Morgan [email protected]:
Brian Flad |
Have you discovered anything on this? Is there anything else I can provide or test that might help? |
I was going through some of my other cookbook backlogs over the weekend. On Mon, Feb 3, 2014 at 12:15 PM, Wes Morgan [email protected]:
Brian Flad |
Interestingly, deploying all this to a c3.2xlarge HVM instance seems to have fixed the problem (at least everything worked on the first Chef run the first time I tried it). Before I was using c1.xlarge instances with instance-store AMIs (both official Ubuntu 13.10 images). |
Okay this issue from what I can tell is two-fold:
Basically, the docker daemon usually "starts" fairly quickly according to Upstart (and Chef), but it can take a little bit for the socket to be opened, especially on slow instances. You can test this on any t1.micro such as ami-7e64074e (us-west-2 Ubuntu 13.10 64-bit): In fact, on my t1.micro instance right now it took 14 minutes...
An extreme example, but hardly desirable. So what to do?
If you have other ideas, I'm all ears. |
Before issuing any commands that talk to the local docker daemon, make sure it is running (since its service starts in the background).
Fix in 0.30.0 which will be released tonight. |
I'm provisioning new Ubuntu 13.10 nodes in EC2 using knife-ec2. When I use docker::default to install Docker and then a docker_container resource after that, I get the error:
dial unix /var/run/docker.sock: no such file or directory
But when I SSH into the machine, that file is there and docker is running.
Here's the command that it attempts to run the container with:
docker run -cidfile /var/run/registry.cid -d -e SETTINGS_FLAVOR=prod -name registry -p 5000:5000 -v /mnt/docker-registry-storage:/tmp/registry -v /mnt/docker-registry-config:/docker-registry/config registry
When I SSH in immediately after the first Chef run, that command succeeds.
Any ideas?
The text was updated successfully, but these errors were encountered: