Skip to content

Commit 31bfe60

Browse files
author
Matthew Fisher
committed
fix(controller): use etcd_safe_mkdir
1 parent afdc1fb commit 31bfe60

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

controller/bin/boot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ function etcd_set_default {
2828
etcdctl --no-sync -C $ETCD mk $ETCD_PATH/$1 $2 >/dev/null 2>&1 || true
2929
}
3030

31+
function etcd_safe_mkdir {
32+
etcdctl --no-sync -C $ETCD mkdir $1 >/dev/null 2>&1 || true
33+
}
34+
3135
etcd_set_default protocol ${DEIS_PROTOCOL:-http}
3236
etcd_set_default secretKey ${DEIS_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
3337
etcd_set_default builderKey ${DEIS_BUILDER_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
3438
etcd_set_default registrationEnabled 1
3539
etcd_set_default webEnabled 0
3640
# create path for application metadata
37-
etcdctl --no-sync -C $ETCD mkdir /deis/services
41+
etcd_safe_mkdir /deis/services
3842

3943
# wait for confd to run once and install initial templates
4044
until confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null; do

0 commit comments

Comments
 (0)