diff --git a/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 b/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 index 3f5e1ef299..82c297c5df 100644 --- a/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 +++ b/docker/mariadb/mariadb-clustercheck/Dockerfile.j2 @@ -15,5 +15,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build {% endif %} +COPY extend_start.sh /usr/local/bin/kolla_extend_start + +RUN chmod 644 /usr/local/bin/kolla_extend_start + {% block mariadb_clustercheck_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/mariadb/mariadb-clustercheck/extend_start.sh b/docker/mariadb/mariadb-clustercheck/extend_start.sh new file mode 100644 index 0000000000..7379abddc6 --- /dev/null +++ b/docker/mariadb/mariadb-clustercheck/extend_start.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb} + +# Create log directory, with appropriate permissions +if [[ ! -d "${MARIADB_LOG_DIR}" ]]; then + mkdir -p ${MARIADB_LOG_DIR} +fi +if [[ $(stat -c %a ${MARIADB_LOG_DIR}) != "755" ]]; then + chmod 755 ${MARIADB_LOG_DIR} +fi