deis/deis — pull request #2308 by carmstrong (2014-10-29 03:42:00+00:00)
Title: fix(*): etcd_set_default and etcd_safe_mkdir raise some errors

Currently, both `etcd_set_default` and `etcd_safe_mkdir` in
the /bin/boot scripts never fail due to `|| true`. This is usually
desired because if the key already exists, we don't want to overwrite
it. However, if there is an underlying error connecting to etcd, we
swallow that as well.

This commit exploits the fact that `etcdctl` has different exit codes
for key errors and etcd errors to swallow only the errors we wish to.

fixes #2214