Skip to content

Commit 9035251

Browse files
markgoddardmnasiadka
authored andcommitted
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
1 parent 600ed4f commit 9035251

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

docker/mariadb/mariadb-clustercheck/Dockerfile.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
55

66
{% block mariadb_clustercheck_header %}{% endblock %}
77

8+
COPY extend_start.sh /usr/local/bin/kolla_extend_start
9+
10+
RUN chmod 644 /usr/local/bin/kolla_extend_start
11+
812
{% block mariadb_clustercheck_footer %}{% endblock %}
913
{% block footer %}{% endblock %}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb}
4+
5+
# Create log directory, with appropriate permissions
6+
if [[ ! -d "${MARIADB_LOG_DIR}" ]]; then
7+
mkdir -p ${MARIADB_LOG_DIR}
8+
fi
9+
if [[ $(stat -c %a ${MARIADB_LOG_DIR}) != "755" ]]; then
10+
chmod 755 ${MARIADB_LOG_DIR}
11+
fi

0 commit comments

Comments
 (0)