From ed54025f68c671035a6d1cbeccf55a94938956ec Mon Sep 17 00:00:00 2001 From: "Ikramullah, Ikram" Date: Thu, 9 Apr 2020 09:06:26 -0400 Subject: Changing log writes location to /var/log for oof/has The log locaitons that the processes write to should be a common place so that a non-root that starts the process can be setup to manage the writes to that location. Chaning all log locations to /var/log where user 'onap' has been given write access to. Issue-ID: OPTFRA-711 Signed-off-by: Ikramullah, Ikram Change-Id: I524534179b98c29acaf697dabdddd63b213199ba --- .../oof-has/charts/oof-has-api/templates/deployment.yaml | 2 +- kubernetes/oof/charts/oof-has/resources/config/log.conf | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'kubernetes/oof/charts/oof-has') diff --git a/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml index 782160b67b..ae859cfaa0 100755 --- a/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml +++ b/kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml @@ -85,7 +85,7 @@ spec: image: "{{ include "common.repository" . }}/{{ .Values.global.image.optf_has }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/bin/bash","-c"] - args: ["nginx && /usr/local/bin/uwsgi -s /run/conductor/uwsgi.sock --chmod-socket=777 --wsgi-file /etc/nginx/conductor.wsgi --callable application --set port=80 --die-on-term --exit-on-reload --logto /opt/conductor-uwsgi.log --pidfile /run/conductor/conductor-uwsgi.pid --enable-threads --workers 6 --master --vacuum --single-interpreter --socket-timeout 10 --max-worker-lifetime 300 --max-requests 100 --no-defer-accept --logfile-chown --logfile-chmod 664 --protocol=uwsgi --socket 0.0.0.0:80"] + args: ["nginx && /usr/local/bin/uwsgi -s /run/conductor/uwsgi.sock --chmod-socket=777 --wsgi-file /etc/nginx/conductor.wsgi --callable application --set port=80 --die-on-term --exit-on-reload --logto /var/log/conductor-uwsgi.log --pidfile /run/conductor/conductor-uwsgi.pid --enable-threads --workers 6 --master --vacuum --single-interpreter --socket-timeout 10 --max-worker-lifetime 300 --max-requests 100 --no-defer-accept --logfile-chown --logfile-chmod 664 --protocol=uwsgi --socket 0.0.0.0:80"] ports: - containerPort: {{ .Values.liveness.periodSeconds }} # disable liveness probe when breakpoints set in debugger diff --git a/kubernetes/oof/charts/oof-has/resources/config/log.conf b/kubernetes/oof/charts/oof-has/resources/config/log.conf index 0fb963e674..9e4e29a1ba 100755 --- a/kubernetes/oof/charts/oof-has/resources/config/log.conf +++ b/kubernetes/oof/charts/oof-has/resources/config/log.conf @@ -33,31 +33,31 @@ args=(sys.stdout,) class=handlers.TimedRotatingFileHandler level=NOTSET formatter=generic -args=('application.log','midnight', 1, 10) +args=('/var/log/application.log','midnight', 1, 10) [handler_audithand] class=handlers.TimedRotatingFileHandler level=INFO formatter=audit -args=('audit.log', 'midnight', 1, 10) +args=('/var/log/audit.log', 'midnight', 1, 10) [handler_metrichand] class=handlers.TimedRotatingFileHandler level=INFO formatter=metric -args=('metric.log','midnight', 1, 10) +args=('/var/log/metric.log','midnight', 1, 10) [handler_errhand] class=handlers.TimedRotatingFileHandler level=ERROR formatter=error -args=('error.log','midnight', 1, 10) +args=('/var/log/error.log','midnight', 1, 10) [handler_debughand] class=handlers.TimedRotatingFileHandler level=DEBUG formatter=generic -args=('debug.log','midnight', 1, 10) +args=('/var/log/debug.log','midnight', 1, 10) [formatters] keys=generic,audit,metric,error -- cgit 1.2.3-korg