diff options
| author | Doug Szumski <doug@stackhpc.com> | 2019-08-08 14:14:34 +0000 |
|---|---|---|
| committer | Doug Szumski <doug@stackhpc.com> | 2019-08-08 16:17:02 +0000 |
| commit | 99de712a2dd49593daba09accac7811bc51b56ad (patch) | |
| tree | c9b482f131ec45fcb4bcfca53d78cc15f4d0f574 /docker | |
| parent | ae12359b83c514473793a9a42281a786d553b64f (diff) | |
| download | kolla-99de712a2dd49593daba09accac7811bc51b56ad.tar.gz kolla-99de712a2dd49593daba09accac7811bc51b56ad.zip | |
Support customising MariaDB log directory
This retains the default, but allows the directory to be customised
if required. This is useful, for example, when using Kolla Ansible
to deploy multiple instances of MariaDB.
Partially Implements: blueprint support-nova-cells
Change-Id: I042fbe140ee84f2ed72e27635be247cb145aac5f
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/mariadb/extend_start.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docker/mariadb/extend_start.sh b/docker/mariadb/extend_start.sh index c07c00a9e..72f60c857 100644 --- a/docker/mariadb/extend_start.sh +++ b/docker/mariadb/extend_start.sh @@ -1,5 +1,7 @@ #!/bin/bash +: ${MARIADB_LOG_DIR:=/var/log/kolla/mariadb} + function bootstrap_db { mysqld_safe --wsrep-new-cluster --skip-networking --wsrep-on=OFF --pid-file=/var/lib/mysql/mariadb.pid & # Wait for the mariadb server to be "Ready" before starting the security reset with a max timeout @@ -24,11 +26,11 @@ function bootstrap_db { } # Create log directory, with appropriate permissions -if [[ ! -d "/var/log/kolla/mariadb" ]]; then - mkdir -p /var/log/kolla/mariadb +if [[ ! -d "${MARIADB_LOG_DIR}" ]]; then + mkdir -p ${MARIADB_LOG_DIR} fi -if [[ $(stat -c %a /var/log/kolla/mariadb) != "755" ]]; then - chmod 755 /var/log/kolla/mariadb +if [[ $(stat -c %a ${MARIADB_LOG_DIR}) != "755" ]]; then + chmod 755 ${MARIADB_LOG_DIR} fi # This catches all cases of the BOOTSTRAP variable being set, including empty |
