vgutierrez@cp1008:~$ sudo -i puppet agent -t terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid
Description
Description
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | jbond | T184561 Modernize Puppet Configuration Management (2017-18 Q3 Goal) | |||
Resolved | jbond | T184564 Plan Puppet 5 upgrade | |||
Resolved | jbond | T219803 upgrade facter and puppet across the fleet | |||
Declined | jbond | T221343 puppet fails to run in cp1008 under certain conditions |
Event Timeline
Comment Actions
so... this is caused by my locales:
vgutierrez@cp1008:~$ unset LC_CTYPE vgutierrez@cp1008:~$ sudo -i puppet agent -t Warning: Support for ruby version 2.1.5 is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions. (location: /usr/lib/ruby/vendor_ruby/puppet.rb:130:in `<module:Puppet>') Warning: Downgrading to PSON for future requests Info: Using configured environment 'production' Info: Retrieving pluginfacts
but this was working as expected before
Comment Actions
For completeness/context: Previously cp1008 was using facter 2.4.6, but it's now running 3.11.0 as part of the canary hosts which were migrated to v3.
Comment Actions
I had a quick look at this and was unable to recreate it, i did come across the following though and wonder if the work around there may work
https://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6-with-lang-en-us-utf-8
Comment Actions
I have noticed you can tirgger this bug by using a locale not present on the server
for loc in $(locale -a) en_GB.utf8 ; do echo ${loc}; sudo env LC_ALL=${loc} puppet help agent > /dev/null ; done C Warning: Support for ruby version 2.1.5 is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions. (location: /usr/lib/ruby/vendor_ruby/puppet.rb:130:in `<module:Puppet>') C.UTF-8 Warning: Support for ruby version 2.1.5 is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions. (location: /usr/lib/ruby/vendor_ruby/puppet.rb:130:in `<module:Puppet>') en_US.utf8 Warning: Support for ruby version 2.1.5 is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions. (location: /usr/lib/ruby/vendor_ruby/puppet.rb:130:in `<module:Puppet>') POSIX Warning: Support for ruby version 2.1.5 is deprecated and will be removed in a future release. See https://puppet.com/docs/puppet/latest/system_requirements.html for a list of supported ruby versions. (location: /usr/lib/ruby/vendor_ruby/puppet.rb:130:in `<module:Puppet>') en_GB.utf8 terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid