From a8d2486f6f0881bc54300504514b0a0809ddcf55 Mon Sep 17 00:00:00 2001 From: Luca Miccini Date: Tue, 22 Sep 2020 16:39:07 +0200 Subject: [PATCH] Ensure LANG env is properly set when puppet runs. Queens adaptation of https://review.opendev.org/c/openstack/tripleo-heat-templates/+/753407 When puppet run it must support UTF-8 or whatever is the locale on the host. So we make sure that we pass down the LANG to the container and that the puppet process collect it properly. Change-Id: Ieca91d86eda26b0e95d06f3ec78714918e8c3fc0 Co-Authored-By: Sofer Athlan-Guyot Co-Authored-By: Damien Ciabrini Co-Authored-By: Daniel Bengtsson --- docker/docker-puppet.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/docker-puppet.py b/docker/docker-puppet.py index 373615b359..7e1d44edf0 100755 --- a/docker/docker-puppet.py +++ b/docker/docker-puppet.py @@ -230,6 +230,8 @@ with open(sh_script, 'w') as script_file: # $::deployment_type in puppet-tripleo export FACTER_deployment_type=containers export FACTER_uuid=$(cat /sys/class/dmi/id/product_uuid | tr '[:upper:]' '[:lower:]') + : ${LANG=en_US.UTF-8} + export LANG FACTER_hostname=$HOSTNAME /usr/bin/puppet apply --summarize \ --detailed-exitcodes --color=false --logdest syslog --logdest console --modulepath=/etc/puppet/modules:/usr/share/openstack-puppet/modules $TAGS /etc/config.pp rc=$?