Comments (8)
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.
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.
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/175c4fb1fdfde8768f43docker_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']
endReply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-33503791
.
Brian Flad
http://about.me/bflad
from docker.
Have you discovered anything on this? Is there anything else I can provide or test that might help?
from docker.
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.
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.
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.
Fix in 0.30.0 which will be released tonight.
from docker.
Related Issues (20)
- docker Chef 17 compatibility HOT 1
- (debian-9, installation-script-main) is no longer a valid test HOT 1
- Changelog weirdness
- Containers with embedded health checks restart on every Chef run
- Logging drivers are out of sync
- Can't stop updates to /lib/systemd/system/docker.service
- README.md is missing resources / broken links
- Setting a version causes a service restart on every run HOT 4
- docker_installation_tarball group is always reset HOT 1
- Wrong source list generation for Debian 11 HOT 8
- Use docker_image resource with build_if_missing action with buildkit
- Invalid filter 'dangling=[docker_image_prune[cleanup]]'
- docker Chef 18 compatibility HOT 7
- docker-ce package name in ubuntu 22.04 is in a different format that affects module 'docker_installation_package' HOT 1
- Can't start a simple container
- Dependency Dashboard
- docker_volume_prune resource
- Unable to use `package_name`-property of the `docker_service`-resource
- PR #1253 is a breaking change. Break on CentOS 7 (Old kernel without cgroup v2)
- ipv6 forwarding prevents the daemon to run when ipv6 is disabled in kernel
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.