From 7bc03b99ff4fd35fcece4aa4b840d3c5c0b7b45d Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Fri, 9 Aug 2024 21:21:48 +0300 Subject: [PATCH] Configure Apache services to use correct locale Closes-Bug: #2076453 Change-Id: I6af9baf09a19a7dbcaf98585870aa44ff79398d3 Signed-off-by: Maksim Malchuk (cherry picked from commit 2caa64df67349b365b5ce94a0e9625d0b6ff87d1) --- docker/base/httpd_setup.sh | 10 ++++++++++ .../configure-apache-locale-d0150e5881f00e65.yaml | 7 +++++++ 2 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/configure-apache-locale-d0150e5881f00e65.yaml diff --git a/docker/base/httpd_setup.sh b/docker/base/httpd_setup.sh index eb3d6794e9..35f7b5b1e3 100644 --- a/docker/base/httpd_setup.sh +++ b/docker/base/httpd_setup.sh @@ -39,3 +39,13 @@ EOF /usr/libexec/httpd-ssl-gencerts fi fi + +# The default system locale with unicode support +LANG=C.UTF-8 + +# Override the default locale if configured +if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then + [ -f /etc/default/locale ] && . /etc/default/locale +else + [ -f /etc/locale.conf ] && . /etc/locale.conf +fi diff --git a/releasenotes/notes/configure-apache-locale-d0150e5881f00e65.yaml b/releasenotes/notes/configure-apache-locale-d0150e5881f00e65.yaml new file mode 100644 index 0000000000..ca7f9d9107 --- /dev/null +++ b/releasenotes/notes/configure-apache-locale-d0150e5881f00e65.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Apache services like Keystone now started with correct unicode locale. + Keystone under Apache on Ubuntu will fail with a UnicodeEncodeError + when LDAP driver and DEBUG are enabled. + `LP#2076453 `__