Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide health check output #569

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions scripts/install-aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
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 () {
until grpcHealthCheck; do
echo "Waiting for ipamd health check";
sleep 1;
done
echo "Ipamd is up and serving"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/Ipamd is up and serving/L-IPAMD is up and ready to serve/g

}

main () {
Expand All @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Break this down into two steps

  • Moving the cni-plugin
  • Moving the cni-conf

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix in master branch.

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