Commit 29b6138
committed
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.1 parent 85f7b3b commit 29b6138
1 file changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
| 68 | + | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
0 commit comments