Changing log writes location to /var/log for oof/has 55/105655/1
authorIkramullah, Ikram <ikram@research.att.com>
Thu, 9 Apr 2020 13:06:26 +0000 (09:06 -0400)
committerIkramullah, Ikram <ikram@research.att.com>
Thu, 9 Apr 2020 13:10:25 +0000 (09:10 -0400)
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 <ikram@research.att.com>
Change-Id: I524534179b98c29acaf697dabdddd63b213199ba

kubernetes/oof/charts/oof-has/charts/oof-has-api/templates/deployment.yaml
kubernetes/oof/charts/oof-has/resources/config/log.conf

index 782160b..ae859cf 100755 (executable)
@@ -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
index 0fb963e..9e4e29a 100755 (executable)
@@ -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