From e251ff660d68e253efc8ad3e00bdc0f60221b2bd Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 19 Aug 2013 18:46:22 -0400 Subject: [PATCH 1/2] fix(dev-db/etcd): Remove -v flag, DEBUG is overly verbose prod hosts. --- .../dev-db/etcd/{etcd-0.1.1.ebuild => etcd-0.1.1-r1.ebuild} | 0 .../third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename sdk_container/src/third_party/coreos-overlay/dev-db/etcd/{etcd-0.1.1.ebuild => etcd-0.1.1-r1.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/etcd-0.1.1.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/etcd-0.1.1-r1.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/dev-db/etcd/etcd-0.1.1.ebuild rename to sdk_container/src/third_party/coreos-overlay/dev-db/etcd/etcd-0.1.1-r1.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap b/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap index 74a54d1559..47ef1435cd 100755 --- a/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap +++ b/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap @@ -2,7 +2,7 @@ VIRT=$(coreos-detect-virt) STATE=/var/lib/etcd -DEFAULT_ARGS="-v -d $STATE -f" +DEFAULT_ARGS="-d $STATE -f" if [ "${VIRT}" != "ec2" ]; then echo "Detected environment \"${VIRT}\", just starting solo master..." From 5793e6c7f990ece630c85711cab6f475def386bd Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 19 Aug 2013 19:06:27 -0400 Subject: [PATCH 2/2] fix(dev-db/etcd): Fix command line args for >=0.1 etcd versions. -h is gone, replaced by -n, -c, and -s --- .../coreos-overlay/dev-db/etcd/files/etcd-bootstrap | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap b/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap index 47ef1435cd..e462e212c2 100755 --- a/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap +++ b/sdk_container/src/third_party/coreos-overlay/dev-db/etcd/files/etcd-bootstrap @@ -16,14 +16,16 @@ BOOTSTRAP="/var/run/etcd/bootstrap.config" [ ! -e $BOOTSTRAP ] && echo bootstrap config missing && exit 1 +CLUSTER_ARGS="-n $MY_IP -c $MY_IP:4001 -s $MY_IP:7001" + # strip blank lines IPS=$(grep -v $MY_IP $BOOTSTRAP|grep -v '^\n$' |sed 's/$/:7001/'|tr '\n' ','|sed 's/^,//'|sed 's/,$//') if [ -z "$IPS" ]; then echo "becoming master..." - exec /usr/bin/etcd ${DEFAULT_ARGS} -h $MY_IP + exec /usr/bin/etcd ${DEFAULT_ARGS} ${CLUSTER_ARGS} else echo "trying $IPS" set -x - exec /usr/bin/etcd ${DEFAULT_ARGS} -h $MY_IP -C "$IPS" + exec /usr/bin/etcd ${DEFAULT_ARGS} ${CLUSTER_ARGS} -C "$IPS" fi