diff --git a/container-images/tripleo_kolla_template_overrides.j2 b/container-images/tripleo_kolla_template_overrides.j2 index 215e08538..4c806459c 100644 --- a/container-images/tripleo_kolla_template_overrides.j2 +++ b/container-images/tripleo_kolla_template_overrides.j2 @@ -326,6 +326,13 @@ RUN mkdir -p /openstack && \ HEALTHCHECK CMD /openstack/healthcheck {% endblock %} +{% block opendaylight_footer %} +RUN mkdir -p /openstack && \ + ln -s /usr/share/openstack-tripleo-common/healthcheck/opendaylight-api /openstack/healthcheck && \ + chmod -R a+rx /openstack +HEALTHCHECK CMD /openstack/healthcheck +{% endblock %} + {% block rabbitmq_footer %} RUN yum install -y pacemaker pacemaker-remote pcs libqb resource-agents && mkdir /etc/libqb diff --git a/healthcheck/opendaylight-api b/healthcheck/opendaylight-api new file mode 100644 index 000000000..72f510533 --- /dev/null +++ b/healthcheck/opendaylight-api @@ -0,0 +1,11 @@ +#!/bin/bash + +. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh + +username=$(get_config_val /opt/opendaylight/etc/org.jolokia.osgi.cfg DEFAULT org.jolokia.user admin) +password=$(get_config_val /opt/opendaylight/etc/org.jolokia.osgi.cfg DEFAULT org.jolokia.password admin) +bind_host=$(grep -r '' "/opt/opendaylight/etc/jetty.xml" | awk -F'>' FNR==1'{print $2}') +bind_port=$(grep -r '