This is the first in a series of patches that will implement healthchecks for containerized services, conforming to the Docker HEALTHCHECK api and to the container-healthchecks blueprint. This commit includes an example healtcheck (for heat-api), and modifies the pep8 check to error out on duplicate jinja blocks in container-images/tripleo_kolla_template_overrides.j2, since we will be adding or modifying the _footer block for each service. Change-Id: Id9fc19dd386e395317093d1723b836ae2807fdf0 Implements: blueprint container-healthchecks Co-authored-by: Dan Prince <dprince@redhat.com> Co-authored-by: Ian Main <imain@redhat.com>changes/81/483081/6
parent
db171f27b7
commit
80fe68beb8
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
bind_host=$(crudini --get /etc/heat/heat.conf heat_api bind_host 2> /dev/null || echo 127.0.0.1)
|
||||
bind_port=$(crudini --get /etc/heat/heat.conf heat_api bind_port 2> /dev/null || echo 8004)
|
||||
curl --fail http://${bind_host}:${bind_port}/ || exit 1
|
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
myname=${0##*/}
|
||||
path=container-images/tripleo_kolla_template_overrides.j2
|
||||
|
||||
grep '{% block' $path |
|
||||
sort |
|
||||
uniq -c |
|
||||
awk -v myname=$myname '
|
||||
$1 == 2 {
|
||||
printf "%s: found duplicate block for %s\n", myname, $4
|
||||
retval=1
|
||||
}
|
||||
|
||||
END {exit retval}
|
||||
'
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "$myname: duplicate jinja block declarations found in $path" >&2
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in new issue