From b1a2d744061a2e85dfb0a366b0cc16c284cf9a5f Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Thu, 16 Oct 2014 15:56:41 -0400 Subject: [PATCH] add /check.sh script to nova-api image Change-Id: Ia0f796b3a580c57b9f84390bae3b1012f99dcce0 --- docker/nova-controller/nova-api/Dockerfile | 2 ++ docker/nova-controller/nova-api/check.sh | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 docker/nova-controller/nova-api/check.sh diff --git a/docker/nova-controller/nova-api/Dockerfile b/docker/nova-controller/nova-api/Dockerfile index 23e4c076fe..cfde6ce10e 100644 --- a/docker/nova-controller/nova-api/Dockerfile +++ b/docker/nova-controller/nova-api/Dockerfile @@ -7,4 +7,6 @@ RUN yum -y install \ EXPOSE 8773 8774 8775 ADD ./start.sh /start.sh +ADD ./check.sh /check.sh + CMD ["/start.sh"] diff --git a/docker/nova-controller/nova-api/check.sh b/docker/nova-controller/nova-api/check.sh new file mode 100755 index 0000000000..a738b1002a --- /dev/null +++ b/docker/nova-controller/nova-api/check.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +RES=0 + +. /openrc +if ! keystone token-get > /dev/null; then + echo "ERROR: keystone token-get failed" >&2 + RES=1 +else + if ! nova list > /dev/null; then + echo "ERROR: nova list failed" >&2 + RES=1 + fi +fi + +exit $RES +