Coder Social home page Coder Social logo

Comments (8)

bflad avatar bflad commented on June 9, 2024

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!

from docker.

cap10morgan avatar cap10morgan commented on June 9, 2024

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

from docker.

bflad avatar bflad commented on June 9, 2024

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]:

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

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

Brian Flad
http://about.me/bflad

from docker.

cap10morgan avatar cap10morgan commented on June 9, 2024

Have you discovered anything on this? Is there anything else I can provide or test that might help?

from docker.

bflad avatar bflad commented on June 9, 2024

I was going through some of my other cookbook backlogs over the weekend.
Hopefully can focus on this tonight.

On Mon, Feb 3, 2014 at 12:15 PM, Wes Morgan [email protected]:

Have you discovered anything on this? Is there anything else I can provide
or test that might help?

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

Brian Flad
http://about.me/bflad

from docker.

cap10morgan avatar cap10morgan commented on June 9, 2024

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).

from docker.

bflad avatar bflad commented on June 9, 2024

Okay this issue from what I can tell is two-fold:

  • AWS instances intermittently being slow (to be expected)
  • Cookbook not ensuring docker daemon is fully running

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): stop docker && rm -f /var/log/upstart/docker.log && date && start docker && tail -f /var/log/upstart/docker.log check out the difference between the date command and when it reads Listening for HTTP on /var/run/docker.sock (unix).

In fact, on my t1.micro instance right now it took 14 minutes...

# stop docker && rm -f /var/log/upstart/docker.log && date && start docker && tail -f /var/log/upstart/docker.log
docker stop/waiting
Tue Feb  4 04:07:12 UTC 2014
docker start/running, process 4215
[/var/lib/docker|2c04b0d0] +job initapi()
[/var/lib/docker|2c04b0d0.initapi()] Creating server
Loading containers: : done.
2014/02/04 04:21:12 WARNING: Your kernel does not support cgroup swap limit.
[/var/lib/docker|2c04b0d0.initapi()] Creating pidfile
[/var/lib/docker|2c04b0d0.initapi()] Setting up signal traps
[/var/lib/docker|2c04b0d0] Register(export) (handlers=map[initapi:0x4a5530 version:0x4c18c0])
[/var/lib/docker|2c04b0d0] Register(create) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0])
[/var/lib/docker|2c04b0d0] Register(stop) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0 create:0x4c7300])
[/var/lib/docker|2c04b0d0] Register(start) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0 create:0x4c7300 stop:0x4c7340])
[/var/lib/docker|2c04b0d0] Register(kill) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380])
[/var/lib/docker|2c04b0d0] Register(serveapi) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 kill:0x4c73c0])
[/var/lib/docker|2c04b0d0] Register(wait) (handlers=map[initapi:0x4a5530 version:0x4c18c0 export:0x4c72c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 kill:0x4c73c0 serveapi:0x4c7400])
[/var/lib/docker|2c04b0d0] Register(tag) (handlers=map[version:0x4c18c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 wait:0x4c7440 initapi:0x4a5530 export:0x4c72c0 kill:0x4c73c0 serveapi:0x4c7400])
[/var/lib/docker|2c04b0d0] Register(resize) (handlers=map[version:0x4c18c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 wait:0x4c7440 initapi:0x4a5530 export:0x4c72c0 kill:0x4c73c0 serveapi:0x4c7400 tag:0x4c7480])
[/var/lib/docker|2c04b0d0] Register(commit) (handlers=map[version:0x4c18c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 wait:0x4c7440 resize:0x4c74c0 initapi:0x4a5530 export:0x4c72c0 kill:0x4c73c0 serveapi:0x4c7400 tag:0x4c7480])
[/var/lib/docker|2c04b0d0] Register(info) (handlers=map[version:0x4c18c0 create:0x4c7300 stop:0x4c7340 start:0x4c7380 wait:0x4c7440 resize:0x4c74c0 initapi:0x4a5530 export:0x4c72c0 kill:0x4c73c0 serveapi:0x4c7400 tag:0x4c7480 commit:0x4c7500])
[/var/lib/docker|2c04b0d0] -job initapi() = OK (0)
[/var/lib/docker|2c04b0d0] +job serveapi(unix:///var/run/docker.sock)
2014/02/04 04:21:12 Listening for HTTP on /var/run/docker.sock (unix)

An extreme example, but hardly desirable.

So what to do?

  • @jcrobak has an excellent feature he's working on: jcrobak@85d3f25 that hopefully can make its way upstream. It'll fail Chef runs if the daemon timeout is reached when running any docker command.
  • Don't depend on consistency in AWS

If you have other ideas, I'm all ears.

from docker.

bflad avatar bflad commented on June 9, 2024

Fix in 0.30.0 which will be released tonight.

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.