Comments (4)
Maybe it's happened by image_cmd_timeout. If so, it would be good to raise a descriptive error anyway.
from docker.
Yeah; when I got this error, I increased cmd_timeout on my resource and it was fixed. I think the timeout is something setup in Chef's shell_out mixin, so keying a better error might be something more suited for upstream?
from docker.
At least when I'm running, it has the descriptive "command timed out" error a few lines up.
[2013-12-30T08:39:42+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
Chef Client failed. 17 resources updated
[2013-12-30T08:39:42+00:00] ERROR: docker_image[base] (docker_test::image_lwrp line 1) had an error: Mixlib::ShellOut::CommandTimeout: command timed out:
---- Begin output of docker pull base ----
STDOUT: Pulling repository base
STDERR:
---- End output of docker pull base ----
[2013-12-30T08:39:42+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Here's the generator:
https://github.com/opscode/mixlib-shellout/blob/master/lib/mixlib/shellout/unix.rb#L78
I can probably begin/rescue it and return a more helpful message saying to change container_cmd_timeout / image_cmd_timeout or LWRP cmd_timeout. I'll fiddle shortly.
If this works, I'll leave it at FATAL because I'm not sure how useful it would be to continue the Chef run should one of these fail, it would likely be much more of a headache for other resources/behavior later in the run.
from docker.
Got this worked out so it prints a helpful error message and is also catchable should you want rescue logic (for retries, etc) in wrapping cookbooks. I'll document and release this feature in a few minutes as 0.21.0 of the cookbook.
Compiled Resource:
------------------
# Declared in /tmp/kitchen-chef-solo/cookbooks/docker_test/recipes/image_lwrp.rb:1:in `from_file'
docker_image("base") do
action :pull
retries 0
retry_delay 2
cookbook_name :docker_test
recipe_name "image_lwrp"
cmd_timeout 5
image_name "base"
end
[2013-12-30T09:21:05+00:00] INFO: Running queued delayed notifications before re-raising exception
[2013-12-30T09:21:05+00:00] ERROR: Running exception handlers
[2013-12-30T09:21:05+00:00] ERROR: Exception handlers complete
[2013-12-30T09:21:05+00:00] FATAL: Stacktrace dumped to /tmp/kitchen-chef-solo/cache/chef-stacktrace.out
Chef Client failed. 17 resources updated
[2013-12-30T09:21:05+00:00] ERROR: docker_image[base] (docker_test::image_lwrp line 1) had an error: #<Class:0x000000022ab460>::CommandTimeout: Docker command timed out:
docker pull base
Please adjust node image_cmd_timeout attribute or this docker_image cmd_timeout attribute if necessary.
[2013-12-30T09:21:05+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
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.