Commit 99696a6
committed
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.1 parent 51d4d03 commit 99696a6
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
| |||
0 commit comments