fix: Fix the log_dir

If the log_dir is /var/log/kolla, and when we
deploy with devstack, we only chown the permission
for /var/log/kolla/skyline with stack user.
But the permission for /var/log/kolla is still root.
So it can not be access by stack user.
We will both change the log_dir in skyline-console
project.

Change-Id: I852c44cda2f9879aa8d8e405bb39bba13f35b8ca
This commit is contained in:
zhu.boxiang 2022-03-14 10:03:47 +08:00
parent babe6fe563
commit 6494ff6a46
5 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@
devstack_plugins:
skyline-apiserver: https://opendev.org/openstack/skyline-apiserver
zuul_copy_output:
/var/log/kolla/skyline: logs
/var/log/skyline: logs
/etc/skyline: logs
/etc/nginx: logs
host-vars:

View File

@ -28,7 +28,7 @@ RUN export LANG=C.UTF-8 \
&& pip install -U pip setuptools'<58.0.0' \
&& pip install poetry!=1.1.8 \
&& poetry config virtualenvs.create false \
&& mkdir -p /etc/skyline /var/log/kolla/skyline /var/lib/skyline \
&& mkdir -p /etc/skyline /var/log/skyline /var/lib/skyline \
&& cd /skyline \
&& poetry install \
&& pip install ${SKYLINE_CONSOLE_PACKAGE_URL} \

View File

@ -18,7 +18,7 @@ GITDIR["skyline-console"]=$DEST/skyline-console
# Set up default directories
SKYLINE_CONF_DIR=${SKYLINE_CONF_DIR:-/etc/skyline}
SKYLINE_CONF_FILE=${SKYLINE_CONF_DIR}/skyline.yaml
SKYLINE_LOG_DIR=/var/log/kolla/skyline
SKYLINE_LOG_DIR=/var/log/skyline
SKYLINE_ERROR_LOG_FILE=${SKYLINE_LOG_DIR}/error.log
SKYLINE_ACCESS_LOG_FILE=${SKYLINE_LOG_DIR}/access.log
SKYLINE_RUN_DIR=/var/lib/skyline

View File

@ -8,5 +8,5 @@ keepalive = 5
reuse_port = True
proc_name = "skyline"
log_level = "debug"
accesslog = "/var/log/kolla/skyline/access.log"
errorlog = "/var/log/kolla/skyline/error.log"
accesslog = "/var/log/skyline/access.log"
errorlog = "/var/log/skyline/error.log"

View File

@ -44,8 +44,8 @@ http {
'"$upstream_response_time" "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log {{ log_dir | default('/var/log/kolla/') }}skyline/nginx_access.log main;
error_log {{ log_dir | default('/var/log/kolla/') }}skyline/nginx_error.log;
access_log {{ log_dir | default('/var/log') }}/skyline/nginx_access.log main;
error_log {{ log_dir | default('/var/log') }}/skyline/nginx_error.log;
##
# Gzip Settings