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
This commit is contained in:
Takashi Kajinami 2022-07-11 21:51:59 +09:00
parent f5746f9eeb
commit bce186ab87
4 changed files with 22 additions and 0 deletions

View File

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

View File

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

6
healthcheck/manila-api Executable file
View File

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

14
healthcheck/manila-share Executable file
View File

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