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 +