Skip to content

Commit 3057894

Browse files
committed
fix(*): etcdctl and docker history commands eat error output
These errors are benign, but confusing to new users. TESTING: reprovision a cluster (due to changes in cloud config), build components from source, `make run`, and ensure that there are no confusing errors in the output ```console $ vagrant destroy -f && vagrant up $ make build run ``` ``` $ fleetctl status deis-router.1 < snipped... > Jul 23 19:18:53 deis-1 systemd[1]: Starting deis-router... Jul 23 19:18:54 deis-1 systemd[1]: Started deis-router. Jul 23 19:19:06 deis-1 sh[4546]: router: waiting for confd to write initial templates... Jul 23 19:19:11 deis-1 sh[4546]: Starting Nginx... Jul 23 19:19:11 deis-1 sh[4546]: deis-router running... ```
1 parent 4765848 commit 3057894

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export ETCD_PATH=${ETCD_PATH:-/deis/controller}
1616
export ETCD_TTL=${ETCD_TTL:-10}
1717

1818
# wait for etcd to be available
19-
until etcdctl --no-sync -C $ETCD ls >/dev/null; do
19+
until etcdctl --no-sync -C $ETCD ls >/dev/null 2>&1; do
2020
echo "waiting for etcd at $ETCD..."
2121
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
2222
done

systemd/deis-controller.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ After=deis-logger.service
66
[Service]
77
EnvironmentFile=/etc/environment
88
TimeoutStartSec=20m
9-
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller`; docker history $IMAGE >/dev/null || docker pull $IMAGE"
10-
ExecStartPre=/bin/sh -c "docker inspect deis-controller >/dev/null && docker rm -f deis-controller || true"
9+
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller`; docker history $IMAGE >/dev/null 2>&1 || docker pull $IMAGE"
10+
ExecStartPre=/bin/sh -c "docker inspect deis-controller >/dev/null 2>&1 && docker rm -f deis-controller || true"
1111
ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/controller` && docker run --name deis-controller --rm -p 8000:8000 -e PUBLISH=8000 -e HOST=$COREOS_PRIVATE_IPV4 --volumes-from=deis-logger $IMAGE"
1212
ExecStopPost=/usr/bin/docker stop deis-controller
1313

0 commit comments

Comments
 (0)