Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix confd wait issue
Browse files Browse the repository at this point in the history
when trying to boot up the registry, it would skip setting etcd
values if anything was set. Because we made some changes to the
cookbook to set some variables to configure the storage backend,
this broke the container. Changing it to set the secretKey if
not present by default fixes the original intention of this
logic.
  • Loading branch information
Matthew Fisher committed Mar 19, 2014
1 parent ef6299d commit 2931ac6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions registry/bin/seed
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/bin/bash
set -eo pipefail

# if the keyspace already exists, exit early
etcdctl -C $ETCD ls $ETCD_PATH >/dev/null && exit 0

# seed etcd with default configuration
etcdctl -C $ETCD set $ETCD_PATH/protocol http
etcdctl -C $ETCD set $ETCD_PATH/secretKey ${REGISTRY_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
etcdctl -C $ETCD ls $ETCD_PATH/secretKey >/dev/null || etcdctl -C $ETCD set $ETCD_PATH/secretKey ${REGISTRY_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`}

exit 0
exit 0

0 comments on commit 2931ac6

Please sign in to comment.