Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Phoenix
-
2
-
Phoenix 2022-06-08, Phoenix 2022-06-22
-
Needs Assessment
-
Bug Fix
-
When running in the C locale, facter failed to parse YAML-based external facts when the contents were UTF-8 encoded.
-
Needs Assessment
Description
Description:
The customer has recently updated from Puppet 6 to 7 which means facter has switched from v3 to v4. This introduced some bugs for them:
Their current system `locale` is set to `LANG=C`, their fact has some Swedish ASCII characters which are being denied by facter 4 when the system locale is not set to a value that supports the ASCII character.
Example:
[root@c7s-21efc7-0 ~]# export LANG=C
|
[root@c7s-21efc7-0 ~]# facter testfacts
|
[2022-04-20 10:48:17.658941 ] ERROR Facter - Failed to handle /opt/puppetlabs/facter/facts.d/testfacts.yaml as LegacyFacter::Util::Parser::YamlParser facts: invalid byte sequence in US-ASCII
|
|
[root@c7s-21efc7-0 ~]# export LANG=sv_SE.utf8
|
[root@c7s-21efc7-0 ~]# facter testfacts
|
{
|
DomainDescription => "UppstrÃx96m,Ludvig",
|
Group => "Sweden",
|
Role => "Development",
|
TimeZone => "110",
|
UserLastFirst => "UppstrÃx96m,Ludvig",
|
status => "pass"
|
}
|
I have attached a bash script that will set the replication set for this and the code with EXPORT can be used to replicate the issue after running the script.