diff options
| author | Doug Szumski <doug@stackhpc.com> | 2018-10-01 17:09:41 +0100 |
|---|---|---|
| committer | Doug Szumski <doug@stackhpc.com> | 2018-10-02 16:05:13 +0000 |
| commit | a13b4fbfcf84d8efbf8560ccd2da70cdc5549607 (patch) | |
| tree | 578885bb72770713ec54e418486fa8b074915272 /docker | |
| parent | 2743931fe3fb627409f53851f4f55051154e17f6 (diff) | |
| download | kolla-a13b4fbfcf84d8efbf8560ccd2da70cdc5549607.tar.gz kolla-a13b4fbfcf84d8efbf8560ccd2da70cdc5549607.zip | |
Fix potential Monasca-thresh start failure
Monasca-thresh inherits from the Storm container, but we want
it to write logs to the Monasca logs directory. In this commit
we overwrite the script which configures the Storm log directory
with the Monasca script.
Change-Id: Id961134e424117ebefb088021faaf37fa02757d7
Partially-Implements: blueprint monasca-containers
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/monasca/monasca-thresh/Dockerfile.j2 | 5 | ||||
| -rw-r--r-- | docker/monasca/monasca-thresh/extend_start.sh | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/docker/monasca/monasca-thresh/Dockerfile.j2 b/docker/monasca/monasca-thresh/Dockerfile.j2 index 7138d4f0b..31c4abdd0 100644 --- a/docker/monasca/monasca-thresh/Dockerfile.j2 +++ b/docker/monasca/monasca-thresh/Dockerfile.j2 @@ -64,6 +64,11 @@ RUN cd /monasca-common-source/java \ {% endif %} +# Overwrite the script inherited from Storm +COPY extend_start.sh /usr/local/bin/kolla_extend_start +RUN touch /usr/local/bin/kolla_monasca_extend_start \ + && chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_monasca_extend_start + {% block monasca_thresh_footer %}{% endblock %} {% block footer %}{% endblock %} diff --git a/docker/monasca/monasca-thresh/extend_start.sh b/docker/monasca/monasca-thresh/extend_start.sh new file mode 100644 index 000000000..77e835d44 --- /dev/null +++ b/docker/monasca/monasca-thresh/extend_start.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Create log directory, with appropriate permissions +MONASCA_LOG_DIR="/var/log/kolla/monasca" +if [[ ! -d "$MONASCA_LOG_DIR" ]]; then + mkdir -p $MONASCA_LOG_DIR +fi +if [[ $(stat -c %U:%G ${MONASCA_LOG_DIR}) != "monasca:kolla" ]]; then + chown monasca:kolla ${MONASCA_LOG_DIR} +fi +if [[ $(stat -c %a ${MONASCA_LOG_DIR}) != "755" ]]; then + chmod 755 ${MONASCA_LOG_DIR} +fi + +. /usr/local/bin/kolla_monasca_extend_start |
