deis/deis — pull request #1550 by carmstrong (2014-08-09 00:35:31+00:00)
Title: fix(builder): fix race condition in /bin/boot

Commit b0572ef seemed to introduce a race condition. It seems that
etcdctl will return before the key that was set has fully persisted
to the key/value store, so a subsequent get will not always see the
new value of the key.

This resulted in builder often failing to start up, but restarting
it made it come up immediately. This is because the keys
`/deis/slugbuilder/image` and `/deis/slugrunner/image` were populated
by the second time the component was started.

This commit refactors this logic to remove the race condition.