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
This commit is contained in:
parent
600ed4f149
commit
9035251443
@ -5,5 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
|
||||
|
||||
{% block mariadb_clustercheck_header %}{% endblock %}
|
||||
|
||||
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 %}
|
||||
|
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