Page MenuHomePhabricator

puppet fails to run in cp1008 under certain conditions
Closed, DeclinedPublic

Description

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

Event Timeline

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

Vgutierrez renamed this task from puppet fails to run in cp1008 to puppet fails to run in cp1008 under certain conditions.Apr 18 2019, 9:02 AM
Vgutierrez triaged this task as Low priority.

for the record, LC_CTYPE=UTF-8

but this was working as expected before

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.

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

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
BBlack closed this task as Declined.Aug 1 2019, 4:57 PM
BBlack added a subscriber: BBlack.

Decom in T229586