From efa3dbaa678f25085943c34af404d2a9cefa4632 Mon Sep 17 00:00:00 2001 From: Claes Mogren Date: Mon, 5 Aug 2019 12:38:55 -0700 Subject: [PATCH] Hide healthcheck output --- scripts/install-aws.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/install-aws.sh b/scripts/install-aws.sh index 7f0e1b74df..fe9c064a02 100755 --- a/scripts/install-aws.sh +++ b/scripts/install-aws.sh @@ -3,7 +3,7 @@ set -uo pipefail grpcHealthCheck () { - /app/grpc_health_probe -addr 127.0.0.1:50051 + /app/grpc_health_probe -addr 127.0.0.1:50051 > /dev/null 2>&1 } waitIPamDServing () { @@ -11,6 +11,7 @@ waitIPamDServing () { echo "Waiting for ipamd health check"; sleep 1; done + echo "Ipamd is up and serving" } main () { @@ -23,22 +24,24 @@ main () { cp /app/aws-cni-support.sh /host/opt/cni/bin/ cp /app/portmap /host/opt/cni/bin/ - echo "===== Starting amazon-k8s-agent ===========" + echo "====== Starting amazon-k8s-agent ======" /app/aws-k8s-agent & # Check ipamd health echo "Checking if ipamd is serving" waitIPamDServing - echo "===== Copying AWS CNI plugin and config =========" + echo "Copying AWS CNI plugin and config" sed -i s/__VETHPREFIX__/"${AWS_VPC_K8S_CNI_VETHPREFIX:-"eni"}"/g /app/10-aws.conflist cp /app/aws-cni /host/opt/cni/bin/ cp /app/10-aws.conflist /host/etc/cni/net.d/ + echo "Node ready, watching ipamd health" # Check that ipamd is healthy, exit if the check fails while grpcHealthCheck; do sleep 10; done + echo "Ipamd health check failed, exiting..." } main