mariadb-clustercheck: ensure /var/log/kolla/mariadb exists
If mariadb-clustercheck starts before mariadb, the directory may not exist, and the command fails. This is necessary for the refactored MariaDB restart in I5a12670d07077d24047aaff57ce8d33ccf7156ff. Change-Id: Ie1b36eb9a403611c2f86aa4c1d500d324e5291f3 (cherry picked from commit 9035251443ed6cbb110e9dc5efdbc9d4be797ef5)
This commit is contained in:
parent
9c0a62a952
commit
2a302e5b65
@ -15,5 +15,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
|||||||
|
|
||||||
{% endif %}
|
{% 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 mariadb_clustercheck_footer %}{% endblock %}
|
||||||
{% block footer %}{% endblock %}
|
{% block footer %}{% endblock %}
|
||||||
|
11
docker/mariadb/mariadb-clustercheck/extend_start.sh
Normal file
11
docker/mariadb/mariadb-clustercheck/extend_start.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user