From e243152f3e53b81be8d9b903105278f7c7a65bb3 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Fri, 9 Feb 2018 15:23:32 +0530 Subject: [PATCH] Add healthcheck script for nova-metadata service This patch adds script for docker health check of nova-metadata service. The script checks API service using curl. Change-Id: Idf6bd2446865df172ed8852ab5297fe671cebd07 (cherry picked from commit 4563a68caf7b0ae46a33123ea42daf37b85b737a) --- container-images/tripleo_kolla_template_overrides.j2 | 6 ++++++ healthcheck/nova-metadata | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 healthcheck/nova-metadata diff --git a/container-images/tripleo_kolla_template_overrides.j2 b/container-images/tripleo_kolla_template_overrides.j2 index b52b2ab9e..7b667e8cf 100644 --- a/container-images/tripleo_kolla_template_overrides.j2 +++ b/container-images/tripleo_kolla_template_overrides.j2 @@ -402,6 +402,12 @@ RUN mkdir -p /openstack && \ chmod a+rx /openstack/healthcheck {% endblock %} +{% block nova_metadata_footer %} +RUN mkdir -p /openstack && \ + ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-metadata /openstack/healthcheck && \ + chmod a+rx /openstack/healthcheck +{% endblock %} + {% block nova_novncproxy_footer %} RUN mkdir -p /openstack && \ ln -s /usr/share/openstack-tripleo-common/healthcheck/nova-vnc-proxy /openstack/healthcheck && \ diff --git a/healthcheck/nova-metadata b/healthcheck/nova-metadata new file mode 100644 index 000000000..116da081c --- /dev/null +++ b/healthcheck/nova-metadata @@ -0,0 +1,6 @@ +#!/bin/sh + +. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh + +check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-metadata_wsgi.conf) +healthcheck_curl ${check_url}