[chef] Re: how to know whether knife bootstrap succeeds?


Chronological Thread 
  • From: Haim Ashkenazi < >
  • To:
  • Subject: [chef] Re: how to know whether knife bootstrap succeeds?
  • Date: Thu, 29 Sep 2011 20:41:39 +0300

Hi Jeff,

AFAIK it always exits with exit-code 0 so unless you look at the output you can't tell whether it failed. I wrote my own wrapper to launch ec2 instance, use Chef::Knife::Bootstrap's ssh_command to get the parsed template (which I modified and added 'set -e') and use custom Net::SSH block to indicate the exit code of the command. It was a little work, but since I use the same process for many machine types it was worth it. If you're interested I can post relevant parts of the code here.

Bye

On Thu, Sep 29, 2011 at 8:27 PM, < "> > wrote:

Chef folks,

I am running knife bootstrap within a script, and I noticed that even though
several parts of the bootstrap obviously failed, the knife exit status is 0.
Is there some way (other than searching the console messages for strings like
ERROR) to know whether the bootstrap really succeeded?

Jeff



--
Haim



Archive powered by MHonArc 2.6.16.

§