From 42bda078291ba529dc086ed064485e66d9d3247f Mon Sep 17 00:00:00 2001 From: Rei Oliveira Date: Mon, 7 Oct 2024 15:31:23 -0300 Subject: [PATCH] Add richer access log format to keystone This change improves the logging format for keystone by adding request time and request size information. Test plan: PASS: Run a full build, install, bootstrap and unlock. Install DC system with subclouds. Fm alarm list. PASS: Verify that /var/log/keystone/keystone.log has information in the format specified. Story: 2011106 Task: 51139 Change-Id: I29736224181205e3adbae675f8449868aba138ac Signed-off-by: Rei Oliveira --- .../debian/deb_patches/0001-Add-stx-support.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openstack/keystone/debian/deb_patches/0001-Add-stx-support.patch b/openstack/keystone/debian/deb_patches/0001-Add-stx-support.patch index b03618b1..0abcbad7 100644 --- a/openstack/keystone/debian/deb_patches/0001-Add-stx-support.patch +++ b/openstack/keystone/debian/deb_patches/0001-Add-stx-support.patch @@ -127,7 +127,7 @@ new file mode 100644 index 000000000..de339caa6 --- /dev/null +++ b/debian/stx/keystone-all -@@ -0,0 +1,157 @@ +@@ -0,0 +1,159 @@ +#!/bin/sh +# Copyright (c) 2013-2018 Wind River Systems, Inc. +# @@ -171,9 +171,10 @@ index 000000000..de339caa6 +THREADS=2 +# Increased timeout to facilitate large image uploads +TIMEOUT="200" ++ACCESS_LOGS_FORMAT='%(h)s %(u)s "%(r)s" status=%(s)s length=%(b)s UA="%(a)s" time_ms="%(M)s"' + +# Calculate the no of workers based on the number of workers retrieved by -+# Platform Eng which is retreived from the keystone-extra.conf ++# Platform Eng which is retrieved from the keystone-extra.conf + +if [ "$system_type" == "All-in-one" ]; then + TIS_WORKERS_FACTOR=1 @@ -223,7 +224,8 @@ index 000000000..de339caa6 + --make-pidfile --exec ${PYTHON} -- ${EXEC} --bind ${BIND_PUBLIC} \ + --worker-class ${WORKER} --workers ${TIS_WORKERS} --threads ${THREADS} \ + --timeout ${TIMEOUT} --max-requests ${MAX_REQUESTS} \ -+ --max-requests-jitter ${MAX_REQ_JITTER_PUBLIC} --log-syslog \ ++ --max-requests-jitter ${MAX_REQ_JITTER_PUBLIC} \ ++ --log-syslog --access-logformat "${ACCESS_LOGS_FORMAT}" \ + --pythonpath '/usr/share/keystone' public:application --name keystone-public + + RETVAL=$?