Fix $LOGDIR owner to be stack.stack
I have seen this failure in the gate a few times:
[ERROR] /opt/stack/devstack/functions-common:2334 Neutron did not start
/opt/stack/devstack/functions-common: line 310:
/opt/stack/logs/error.log: Permission denied
So whatever was trying to be written to error.log never
happened. Change to be like other directories in this
file and make the $LOGDIR owner stack.stack.
Change-Id: I673011aba10c8d03234100503ccc5876e75baff2
diff --git a/stack.sh b/stack.sh
index ad88eab..e0caafa 100755
--- a/stack.sh
+++ b/stack.sh
@@ -349,7 +349,9 @@
# Destination path for devstack logs
if [[ -n ${LOGDIR:-} ]]; then
- mkdir -p $LOGDIR
+ sudo mkdir -p $LOGDIR
+ safe_chown -R $STACK_USER $LOGDIR
+ safe_chmod 0755 $LOGDIR
fi
# Destination path for service data