Giter Club home page Giter Club logo

Comments (4)

 avatar commented on July 17, 2024

Maybe it's happened by image_cmd_timeout. If so, it would be good to raise a descriptive error anyway.

from docker.

jayofdoom avatar jayofdoom commented on July 17, 2024

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.

bflad avatar bflad commented on July 17, 2024

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.

bflad avatar bflad commented on July 17, 2024

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)

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.