[chef] Re: exceptions in resources


Chronological Thread 
  • From: Tensibai Zhaoying < >
  • To:
  • Subject: [chef] Re: exceptions in resources
  • Date: Tue, 14 Oct 2014 20:42:30 +0200

Brief answer: no, you can use ignore_failure in any resource to continue the chef run if it fails.

Side option the retry_count (I think) attribute to let a resource retry its job in case of failure.

The doc about it is somewhere in the common options in docs.getchef.Com, but on the phone I can't tell right now



---- John de la Garza a écrit ----


I just asked a question about which exceptions to rescue when using
http_request.  After
doing some more research, I've learned that  this question doesn't really make
sense...


I've read that I can't catch the Exception at the time the recipe runs.

I have some code that uses Net::HTTP::Get that runs in a lwrp.  I am
able to rescue exceptions
there.  Must I write my own code to do an HTTP post if I need to have
the run not
fail just because it can't post?  The post is ideal, but optional...



Archive powered by MHonArc 2.6.16.

§