From bce186ab873d421421c6befcecaffe0a27bdb2b1 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 11 Jul 2022 21:51:59 +0900 Subject: [PATCH] Fix missing healthcheck script for manila-api/share This change adds healthcheck script for manila-api and manila-share, following the existing for the other api/rpc services. Change-Id: Ief1e41cbe975446cf5d1e62a5db693fd409f3166 --- .../base/os/manila-base/manila-api/manila-api.yaml | 1 + .../os/manila-base/manila-share/manila-share.yaml | 1 + healthcheck/manila-api | 6 ++++++ healthcheck/manila-share | 14 ++++++++++++++ 4 files changed, 22 insertions(+) create mode 100755 healthcheck/manila-api create mode 100755 healthcheck/manila-share diff --git a/container-images/tcib/base/os/manila-base/manila-api/manila-api.yaml b/container-images/tcib/base/os/manila-base/manila-api/manila-api.yaml index 7066d8940..f940db655 100644 --- a/container-images/tcib/base/os/manila-base/manila-api/manila-api.yaml +++ b/container-images/tcib/base/os/manila-base/manila-api/manila-api.yaml @@ -2,6 +2,7 @@ tcib_actions: - run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf - run: mkdir -p /var/www/cgi-bin/manila && cp -a /usr/bin/manila-wsgi /var/www/cgi-bin/manila/manila-wsgi && sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf && sed -i -r 's,^(Listen 443),#\1,' /etc/httpd/conf.d/ssl.conf - run: chown -R manila /var/www/cgi-bin/manila && chmod 755 /var/www/cgi-bin/manila/manila-wsgi +- run: ln -s /usr/share/openstack-tripleo-common/healthcheck/manila-api /openstack/healthcheck && chmod a+rx /openstack/healthcheck tcib_packages: common: - httpd diff --git a/container-images/tcib/base/os/manila-base/manila-share/manila-share.yaml b/container-images/tcib/base/os/manila-base/manila-share/manila-share.yaml index e89429b8e..e3e995cbd 100644 --- a/container-images/tcib/base/os/manila-base/manila-share/manila-share.yaml +++ b/container-images/tcib/base/os/manila-base/manila-share/manila-share.yaml @@ -1,6 +1,7 @@ tcib_actions: - run: dnf -y install {{ tcib_packages.common | join(' ') }} && dnf clean all && rm -rf /var/cache/dnf - run: mkdir -p /etc/libqb +- run: ln -s /usr/share/openstack-tripleo-common/healthcheck/manila-api /openstack/healthcheck && chmod a+rx /openstack/healthcheck tcib_packages: common: - ceph-common diff --git a/healthcheck/manila-api b/healthcheck/manila-api new file mode 100755 index 000000000..0433e4d15 --- /dev/null +++ b/healthcheck/manila-api @@ -0,0 +1,6 @@ +#!/bin/bash + +. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh + +check_url=$(get_url_from_vhost /etc/httpd/conf.d/10-manila_wsgi.conf) +healthcheck_curl ${check_url} diff --git a/healthcheck/manila-share b/healthcheck/manila-share new file mode 100755 index 000000000..8b6177db8 --- /dev/null +++ b/healthcheck/manila-share @@ -0,0 +1,14 @@ +#!/bin/bash + +. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh + +process='manila-share' +args="${@:-5671 5672}" + +if healthcheck_port $process $args; then + exit 0 +else + ports=${args// /,} + echo "There is no $process process with opened RabbitMQ ports ($ports) running in the container" + exit 1 +fi