add /check.sh script to nova-api image

Change-Id: Ia0f796b3a580c57b9f84390bae3b1012f99dcce0
This commit is contained in:
Lars Kellogg-Stedman 2014-10-16 15:56:41 -04:00
parent 2ab124bac0
commit b1a2d74406
2 changed files with 19 additions and 0 deletions

View File

@ -7,4 +7,6 @@ RUN yum -y install \
EXPOSE 8773 8774 8775 EXPOSE 8773 8774 8775
ADD ./start.sh /start.sh ADD ./start.sh /start.sh
ADD ./check.sh /check.sh
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -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