From 8d96d639c8918e52c6d4d0a0bdeba299ea12bb86 Mon Sep 17 00:00:00 2001 From: Serguei Bezverkhi Date: Wed, 23 Mar 2016 12:04:16 -0400 Subject: [PATCH] Add creation of new log folder for Horizon The previous Horizon logging fix missed the part of creating new folder, this fix adds it. Change-Id: I14da441ebb6de94964326c0a1b02ae1480b080bd Closes-Bug: 1561073 --- docker/horizon/extend_start.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh index 299e9379cc..d9c5fafd69 100644 --- a/docker/horizon/extend_start.sh +++ b/docker/horizon/extend_start.sh @@ -22,3 +22,12 @@ if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $? /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compress --force fi fi + +# NOTE(sbezverk) since Horizon is now storing logs in its own location, /var/log/horizon +# needs to be created if it does not exist +if [[ ! -d "/var/log/kolla/horizon" ]]; then + mkdir -p /var/log/kolla/horizon +fi +if [[ $(stat -c %a /var/log/kolla/horizon) != "755" ]]; then + chmod 755 /var/log/kolla/horizon +fi