Issue #11860 has been updated by FJ Landzaat.
I've been using puppet for a while but this issue has been bugging me so much
that I finally felt a need to register to comment on this. I hope I don't sound
like I'm here only to flame, but I've wasted too many hours only because these
variables get changed.
The biggest problem with this is not that messages will be only in english, the
biggest problem is character encoding being messed up. Instead of UTF-8, which
has been default on Linux systems for a very long time, we get the legacy ascii
encoding that no one cares about anymore.
A few months ago me and my colleagues spent a few days trying to figure out why
our java applications were unreliable with character encoding. This was
breaking our website. In the end we figured out it was because the service was
getting restarted by puppet, for config file changes, as intended, but because
puppet drops the LANG variables they ended up with a 7bit java default
encoding. We ended up hard-coding the charset in the init script, although I
still consider it an ugly hack. We wasted more time later on when we found out
there was another java app being affected by this, although we knew by then how
to fix it.
And today I'm working on something simple, or so I thought, and this same issue
bites me again. I'm trying to install a gem package, using the gem provider,
and I get this message:
"ERROR: While executing gem ... (ArgumentError)
invalid byte sequence in US-ASCII"
This works fine from the command-line, but because puppet makes gem use that
crappy C encoding, it fails with puppet.
Just what exactly is so important about the encoding that it is necessary to
break Exec, Package and Service resources, and probably more? I don't think
puppet is even parsing any output from these blocks, afaik it's just using the
command's exit status, so why does it care if the output is in english or
swahili? I'm really getting annoyed with this. How can I trust puppet now to
setup my system properly if it forces everything to use the wrong encoding?
I really want to see a more long-term solution for this. I'll probably end up
writing a small wrapper script for rubygems to force UTF-8, but besides the
fact that its an ugly hack, I really hope I won't run into more
encoding-related problems.
----------------------------------------
Bug #11860: Puppet ovewriting the LANG environment variable.
https://projects.puppetlabs.com/issues/11860#change-59545
Author: Marek Kroemeke
Status: Merged - Pending Release
Priority: Urgent
Assignee: Chris Price
Category: exec
Target version: Telly
Affected Puppet version: 2.7.0
Keywords:
Branch: https://github.com/puppetlabs/puppet/pull/414
As far as I can see puppet is changing system's LANG environment variable -
this causes unexpected bahaviour of applications that use this setting (as LANG
is different when you run /etc/init.d/foo stop/start/restart, and different
when service is restarted by puppet!).
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.