Module: check_mk
Branch: master
Commit: f21a576590f131e80848767a115d635982e3b8ce
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f21a576590f131…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Mar 28 11:59:24 2019 +0100
7330 FIX Fix confusions when working with localized shell environments
When switching to the site user context we now enforce a non localized
environment. The reason for this configuration is that the parameters and
outputs of the monitoring plug-ins are localized. If they are called from the
core, they are always language-neutral. During manual testing, the plugins may
behave differently depending on the localization of the user's environment
variables. This can lead to confusion during tests.
CMK-1832
Change-Id: Ia7b677b0daa5f7945db64b835e6a58cc70c36ee4
---
.werks/7330 | 15 +++++++++++++++
omd/packages/omd/skel/.profile | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/.werks/7330 b/.werks/7330
new file mode 100644
index 0000000..389efb5
--- /dev/null
+++ b/.werks/7330
@@ -0,0 +1,15 @@
+Title: Fix confusions when working with localized shell environments
+Level: 1
+Component: omd
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1553770690
+Class: fix
+
+When switching to the site user context we now enforce a non localized
+environment. The reason for this configuration is that the parameters and
+outputs of the monitoring plug-ins are localized. If they are called from the
+core, they are always language-neutral. During manual testing, the plugins may
+behave differently depending on the localization of the user's environment
+variables. This can lead to confusion during tests.
diff --git a/omd/packages/omd/skel/.profile b/omd/packages/omd/skel/.profile
index 18204c1..2af7294 100644
--- a/omd/packages/omd/skel/.profile
+++ b/omd/packages/omd/skel/.profile
@@ -19,6 +19,14 @@ export MAILRC="$OMD_ROOT/etc/mail.rc"
# Make the python requests module trust the CAs configured in Check_MK
export REQUESTS_CA_BUNDLE=$OMD_ROOT/var/ssl/ca-certificates.crt
+# Enforce a non localized environment. The reason for this configuration is
+# that the parameters and outputs of the monitoring plug-ins are localized. If
+# they are called from the core, they are always language-neutral. During
+# manual testing, the plugins may behave differently depending on the
+# localization of the user's environment variables. This can lead to confusion
+# during tests.
+export LANG=C LC_ALL=C
+
# Set environment for the monitoring plugins that use state retention (like check_snmp).
export NAGIOS_PLUGIN_STATE_DIRECTORY="$OMD_ROOT/var/monitoring-plugins"
export MP_STATE_DIRECTORY=$NAGIOS_PLUGIN_STATE_DIRECTORY