fnichol / knife-server

A Chef Knife plugin to manage Chef Servers. Bootstrap a new Chef Server on Amazon's EC2, Digital Ocean, Linode, OpenStack or a standalone server. Backup and restore your Chef Server or Hosted Chef's node, role, data bag, and environment JSON data.
http://fnichol.github.com/knife-server
Apache License 2.0
158 stars 34 forks source link

use of set -e in bootstrap scripts #12

Closed erikh closed 11 years ago

erikh commented 11 years ago

Wondering if you'd consider patches that added set -e to the bootstrap scripts (and dealt with the consequences). Run into a few server creations where, for whatever reason, dpkg flips out, or chef doesn't converge properly, and the pems just have output from cat (can't find file blabla) in them, which obviously gives knife hives.

It could also be used to check the result of the server creation itself -- I'm automating the use of this tool, so knowing when it succeeds or fails is very handy.

It's obviously a lot more work to maintain though, which is why I'm asking beforehand.

fnichol commented 11 years ago

I like this idea, I'd rather fail fast anyway. And you're right, this should help in more automated workflows. Please proceed!

erikh commented 11 years ago

probably in a few weeks here. thanks!

fnichol commented 11 years ago

Looks like we have set -e set in all templates so far which I agree is the desired behavior (fail fast). Yeah!