Jira (FACT-353) some facts do not work with locales set
Title: Message Title Kurt Wall commented on an issue Re: some facts do not work with locales set Verified in master at SHA=XX. With the default locale, LANG=C, and LANG=de_DE, facter facts appear to work properly. $ be facter | grep mac macaddress = c8:e0:eb:14:69:b1 macaddress_bridge0 = ca:e0:eb:41:27:00 macaddress_en0 = c8:e0:eb:14:69:b1 macaddress_en2 = 10:dd:b1:d3:d3:55 macaddress_en3 = 32:00:19:d3:94:60 macaddress_en4 = 32:00:19:d3:94:61 macaddress_fw0 = 00:0a:27:02:00:52 macaddress_p2p0 = 0a:e0:eb:14:69:b1 macaddress_vmnet1 = 00:50:56:c0:00:01 macaddress_vmnet8 = 00:50:56:c0:00:08 macosx_buildversion = 13D65 macosx_productname = Mac OS X macosx_productversion = 10.9.3 macosx_productversion_major = 10.9 macosx_productversion_minor = 3 sp_machine_model = MacBookPro10,1 sp_machine_name = MacBook Pro $ LANG=C LC_ALL=C be facter | grep mac macaddress = c8:e0:eb:14:69:b1 macaddress_bridge0 = ca:e0:eb:41:27:00 macaddress_en0 = c8:e0:eb:14:69:b1 macaddress_en2 = 10:dd:b1:d3:d3:55 macaddress_en3 = 32:00:19:d3:94:60 macaddress_en4 = 32:00:19:d3:94:61 macaddress_fw0 = 00:0a:27:02:00:52 macaddress_p2p0 = 0a:e0:eb:14:69:b1 macaddress_vmnet1 = 00:50:56:c0:00:01 macaddress_vmnet8 = 00:50:56:c0:00:08 macosx_buildversion = 13D65 macosx_productname = Mac OS X macosx_productversion = 10.9.3 macosx_productversion_major = 10.9 macosx_productversion_minor = 3 sp_machine_model = MacBookPro10,1 sp_machine_name = MacBook Pro $ LANG=de_DE LC_ALL=de_DE be facter | grep mac macaddress = c8:e0:eb:14:69:b1 macaddress_bridge0 = ca:e0:eb:41:27:00 macaddress_en0 = c8:e0:eb:14:69:b1 macaddress_en2 = 10:dd:b1:d3:d3:55 macaddress_en3 = 32:00:19:d3:94:60 macaddress_en4 = 32:00:19:d3:94:61 macaddress_fw0 = 00:0a:27:02:00:52 macaddress_p2p0 = 0a:e0:eb:14:69:b1 macaddress_vmnet1 = 00:50:56:c0:00:01 macaddress_vmnet8 = 00:50:56:c0:00:08 macosx_buildversion = 13D65 macosx_productname = Mac OS X macosx_productversion = 10.9.3 macosx_productversion_major = 10.9 macosx_productversion_minor = 3 sp_machine_model = MacBookPro10,1 sp_machine_name = MacBook Pro Add Comment Facter / FACT-353 some facts do not work with locales set
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Kurt Wall updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Kurt Wall Assignee: KurtWall Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Kurt Wall assigned an issue to Kurt Wall Facter / FACT-353 some facts do not work with locales set Change By: Kurt Wall Assignee: KurtWall Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Adrien Thebo commented on an issue Re: some facts do not work with locales set Merged in 413e2b7. Add Comment Facter / FACT-353 some facts do not work with locales set facter does not clean locale environment variables prior to executing commands and sometimes falls over the localized output. I'm not sure whether this is relevant for facter being executed by puppet, but it makes debugging a lot harder. For example with the macaddress fact {code} root@mail:~# facter | grep mac Could not retrieve macaddress: undefine... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Peter Huene updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Peter Huene Sprint: Week2014-6-18to2014-6-25 Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Peter Huene updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Peter Huene facterdoesnotcleanlocaleenvironmentvariablespriortoexecutingcommandsandsometimesfallsoverthelocalizedoutput.I'mnotsurewhetherthisisrelevantforfacterbeingexecutedbypuppet,butitmakesdebuggingalotharder.Forexamplewiththemacaddressfact pre {code} root@mail:~#facter|grepmacCouldnotretrievemacaddress:undefinedmethod`split'fornil:NilClassCouldnotretrievemacaddress:undefinedmethod`split'fornil:NilClassroot@mail:~#LANG=CLC_ALL=Cfacter|grepmacmacaddress=52:54:00:94:f3:1cmacaddress_eth0=52:54:00:94:f3:1c /pre {code} Thereasonisthatmacaddress.rbislookingforetherorHWaddr pre {code} setcodedoether=[]output=Facter::Util::Resolution.exec(/sbin/ifconfig-a)output.each_linedo|s|ether.push($1)ifs=~/(?:ether|HWaddr)(\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/endFacter::Util::Macaddress.standardize(ether[0]) /pre {code} whichisnotcontainedinthelocalizedoutput pre {code} root@mail:~#ifconfig-aeth0Linkencap:EthernetHardwareAdresse52:54:00:94:f3:1cinetAdresse:80.244.243.68Bcast:80.244.243.71Maske:255.255.255.248inet6-Adresse:2001:4d88:1005::25:1:2/64Gltigkeitsbereich:Globalinet6-Adresse:fe80::5054:ff:fe94:f31c/64Gltigkeitsbereich:VerbindungUPBROADCASTRUNNINGMULTICASTMTU:1500Metrik:1RXpackets:4018239errors:0dropped:0overruns:0frame:0TXpackets:790814errors:0dropped:0overruns:0carrier:0Kollisionen:0Sendewarteschlangenlnge:1000RXbytes:658542927(628.0MiB)TXbytes:162143875(154.6MiB) /pre {code} ThefulldifferencebetweenaLANG=de_DEandLANG=Crunonthesamemachine: pre {code} ---/tmp/facter.DE 2011-10-2522:17:13.568013673+0200+++/tmp/facter.C 2011-10-2522:17:19.504013672+0200@@-8,7+8,11@@hostname=mailid=rootinterfaces=eth0,lo-ipaddress=80.244.243.71+ipaddress=80.244.243.68+ipaddress6=2001:4d88:1005::25:1:2+ipaddress6_eth0=2001:4d88:1005::25:1:2+ipaddress_eth0=80.244.243.68+ipaddress_lo=127.0.0.1is_virtual=truekernel=Linuxkernelmajversion=3.0@@-19,9+23,16@@lsbdistid=Debianlsbdistrelease=testinglsbmajdistrelease=testing+macaddress=52:54:00:94:f3:1c+macaddress_eth0=52:54:00:94:f3:1cmanufacturer=Bochs-memoryfree=345.66MB+memoryfree=348.94MBmemorysize=749.06MB+netmask=255.255.255.248+netmask_eth0=255.255.255.248+netmask_lo=255.0.0.0+network_eth0=80.244.243.64+network_lo=127.0.0.0operatingsystem=Debianoperatingsystemrelease=wheezy/sidosfamily=Debian@@-45,5+56,5@@uptime=1dayuptime_days=1uptime_hours=29-uptime_seconds=107884+uptime_seconds=107890virtual=kvm /pre {code} uptime_secondsandmemory_*hastobeignoredhereofcourse.factershouldprobablyresetLANG/LC*variablesorevenbetteruseasaneAPI,forexample/sys/class/net/ethx/addressonplatformswhereitissupported Add Comment
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Peter Huene updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Peter Huene Story Points: 1 Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Peter Huene updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Peter Huene Fix Version/s: 2.2.0 Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title Kylo Ginsberg updated an issue Facter / FACT-353 some facts do not work with locales set Change By: Kylo Ginsberg Flagged: Impediment Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (FACT-353) some facts do not work with locales set
Title: Message Title redmine.exporter created an issue Facter / FACT-353 some facts do not work with locales set Issue Type: Bug Assignee: Eric Sorenson Created: 27/Feb/14 7:39 AM Labels: redmine Priority: Normal Reporter: redmine.exporter facter does not clean locale environment variables prior to executing commands and sometimes falls over the localized output. I'm not sure whether this is relevant for facter being executed by puppet, but it makes debugging a lot harder. For example with the macaddress fact pre root@mail:~# facter | grep mac Could not retrieve macaddress: undefined method `split' for nil:NilClass Could not retrieve macaddress: undefined method `split' for nil:NilClass root@mail:~# LANG=C LC_ALL=C facter | grep mac macaddress = 52:54:00:94:f3:1c macaddress_eth0 = 52:54:00:94:f3:1c /pre The reason is that macaddress.rb is looking for ether or HWaddr pre setcode do ether = [] output = Facter::Util::Resolution.exec(/sbin/ifconfig -a) output.each_line do |s| ether.push($1) if s =~ /(?:ether|HWaddr) (\w {1,2}:\w{1,2} :\w {1,2}:\w{1,2} :\w {1,2}:\w{1,2} )/ end Facter::Util::Macaddress.standardize(ether[0]) /pre which is not contained in the localized output pre root@mail:~# ifconfig -a eth0 Link encap:Ethernet Hardware Adresse 52:54:00:94:f3:1c inet Adresse:80.244.243.68 Bcast:80.244.243.71 Maske:255.255.255.248 inet6-Adresse: 2001:4d88:1005::25:1:2/64 Gltigkeitsbereich:Global inet6-Adresse: fe80::5054:ff:fe94:f31c/64