Skip to content

Commit 2931ac6

Browse files
author
Matthew Fisher
committed
fix confd wait issue
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.
1 parent ef6299d commit 2931ac6

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

registry/bin/seed

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/bin/bash
22
set -eo pipefail
33

4-
# if the keyspace already exists, exit early
5-
etcdctl -C $ETCD ls $ETCD_PATH >/dev/null && exit 0
6-
74
# seed etcd with default configuration
85
etcdctl -C $ETCD set $ETCD_PATH/protocol http
9-
etcdctl -C $ETCD set $ETCD_PATH/secretKey ${REGISTRY_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`}
6+
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'`}
107

11-
exit 0
8+
exit 0

0 commit comments

Comments
 (0)