kolla/docker/ironic-inspector/extend_start.sh
generalfuzz 998067b849 Run Ironic Inspector as ironic-inspector user
This patch reverts changes to the Dockerfile and configuration script
that were made to support running the service using wsgi. Ironic
Inspector does not currently support running with wsgi.

Change-Id: Idc816f25c85ef7d5cd14182fe01b652876cb181a
2020-09-25 09:37:48 -07:00

18 lines
486 B
Bash

#!/bin/bash
LOG_PATH=/var/log/kolla/ironic-inspector
if [[ ! -d "${LOG_PATH}" ]]; then
mkdir -p "${LOG_PATH}"
fi
if [[ $(stat -c %a "${LOG_PATH}") != "755" ]]; then
chmod 755 "${LOG_PATH}"
fi
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
exit 0
fi