Jira (FACT-2856) Facter fails when interface name is not UTF-8

20 views
Skip to first unread message

Oana Tanasoiu (Jira)

unread,
Nov 12, 2020, 10:01:03 AM11/12/20
to puppe...@googlegroups.com
Oana Tanasoiu created an issue
 
Facter / Bug FACT-2856
Facter fails when interface name is not UTF-8
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/11/12 7:00 AM
Priority: Normal Normal
Reporter: Oana Tanasoiu

OS Name/Version: Solaris 11-64

**Facter fails with the following message:

raceback (most recent call last):
        12: from /opt/puppetlabs/puppet/bin/facter:10:in `<main>'
        11: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start'
        10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
         9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
         8: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
         7: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
         6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:114:in `query'
         5: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:395:in `to_user_output'
         4: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:16:in `format'
         3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:26:in `format_for_no_query'
         2: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:63:in `hash_to_facter_format'
         1: from /opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `pretty_generate'
/opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `generate': "\\xC8" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

 

The problem is reproducible 1 in 10 runs with --show-legacy argument. 

Other faulty logs:

[2020-11-12 06:40:30.648504 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i b ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.648775 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.648885 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.649085 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.654791 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i  ServerID
[2020-11-12 06:40:30.658743 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/smbios -t SMB_TYPE_BIOS
[2020-11-12 06:40:30.662268 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i  ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.662619 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.662774 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.663076 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.663639 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i T�~
�~
x� ServerID

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Oana Tanasoiu (Jira)

unread,
Nov 12, 2020, 10:01:04 AM11/12/20
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
Change By: Oana Tanasoiu
Sprint: ready for triage

Oana Tanasoiu (Jira)

unread,
Nov 12, 2020, 10:03:03 AM11/12/20
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
*OS Name/Version: Solaris 11-64*


**Facter fails with the following message:
{code:java}
raceback (most recent call last):
        12: from /opt/puppetlabs/puppet/bin/facter:10:in `<main>'
        11: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start'
        10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
         9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
         8: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
         7: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
         6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:114:in `query'
         5: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:395:in `to_user_output'
         4: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:16:in `format'
         3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:26:in `format_for_no_query'
         2: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:63:in `hash_to_facter_format'
         1: from /opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `pretty_generate'
/opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `generate': "\\xC8" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError){code}
 

The problem is reproducible *1 in 10* runs with *--show-legacy* argument. 

Other faulty logs:
{code:java}

[2020-11-12 06:40:30.648504 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i b ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.648775 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.648885 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.649085 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.654791 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i  ServerID
[2020-11-12 06:40:30.658743 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/smbios -t SMB_TYPE_BIOS
[2020-11-12 06:40:30.662268 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i  ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.662619 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.662774 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.663076 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 9
[2020-11-12 06:40:30.663639 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i T�~
�~
x� ServerID{code}

Oana Tanasoiu (Jira)

unread,
Nov 12, 2020, 10:04:03 AM11/12/20
to puppe...@googlegroups.com

{code:java}
[2020-11-12 06:40:30.678758 ] DEBUG Facter::Resolvers::Solaris::Networking - resolving fact dhcp, but undefined method `each' for nil:NilClass
[2020-11-12 06:40:30.679221 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
[2020-11-12 06:40:30.679957 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i lo0 ServerID
[2020-11-12 06:40:30.684805 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i lo0 ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.685528 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i net0 ServerID
[2020-11-12 06:40:30.690370 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
[2020-11-12 06:40:30.691141 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i lo0 ServerID
[2020-11-12 06:40:30.695950 ] DEBUG Facter::Resolvers::Solaris::Networking - Command /usr/sbin/dhcpinfo -i lo0 ServerID completed with the following stderr message: /usr/sbin/dhcpinfo: interface is not under DHCP control
[2020-11-12 06:40:30.696140 ] DEBUG Facter::Resolvers::Solaris::Networking - Error! 134
[2020-11-12 06:40:30.697004 ] DEBUG Facter::Core::Execution::Posix - Executing command: /usr/sbin/dhcpinfo -i net0 ServerID
{code}

Bogdan Irimie (Jira)

unread,
Nov 18, 2020, 9:03:03 AM11/18/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Nov 18, 2020, 9:03:03 AM11/18/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ready for triage ghost 25.11

Bogdan Irimie (Jira)

unread,
Nov 18, 2020, 9:04:04 AM11/18/20
to puppe...@googlegroups.com
Bogdan Irimie commented on Bug FACT-2856
 
Re: Facter fails when interface name is not UTF-8

We should have a look over networking on windows, there, we try 3 times to read networking info with FFI before we give up.

Bogdan Irimie (Jira)

unread,
Nov 18, 2020, 10:30:01 AM11/18/20
to puppe...@googlegroups.com
Bogdan Irimie assigned an issue to Bogdan Irimie
 
Change By: Bogdan Irimie
Assignee: Bogdan Irimie

Bogdan Irimie (Jira)

unread,
Nov 18, 2020, 11:04:04 AM11/18/20
to puppe...@googlegroups.com
 
Re: Facter fails when interface name is not UTF-8

 
[2020-11-18 08:02:54.203943 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-18 08:02:54.404848 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-18 08:02:54.405320 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-18 08:02:54.410725 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read MTU! Error code is: 9
[2020-11-18 08:02:54.438906 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-18 08:02:54.439054 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-18 08:02:54.439284 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read MTU! Error code is: 9
[2020-11-18 08:02:54.455312 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-18 08:02:54.455560 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-18 08:02:54.455758 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read MTU! Error code is: 9
[2020-11-18 08:02:54.473796 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-18 08:02:54.484523 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-18 08:02:54.490333 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134

Bogdan Irimie (Jira)

unread,
Nov 19, 2020, 3:29:01 AM11/19/20
to puppe...@googlegroups.com

output from solaris 11.4

There are 4 interfaces
Details: [#<Facter::Resolvers::Solaris::FFI::Lifreq:0x0a741c9c>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0a741bd4>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0a741b0c>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0a741a30>]
[2020-11-19 08:28:02.719165 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-19 08:28:02.913574 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-19 08:28:02.913940 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-19 08:28:02.914172 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mtu! Error code is: 9
[2020-11-19 08:28:03.031467 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-19 08:28:03.031794 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-19 08:28:03.032434 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mtu! Error code is: 9
[2020-11-19 08:28:03.050183 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 9
[2020-11-19 08:28:03.052935 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read netmask! Error code is: 9
[2020-11-19 08:28:03.053102 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mtu! Error code is: 9
There are 4 interfaces
Details: [#<Facter::Resolvers::Solaris::FFI::Lifreq:0x0ac26244>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0ac261f4>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0ac261a4>, #<Facter::Resolvers::Solaris::FFI::Lifreq:0x0ac26154>]
[2020-11-19 08:28:03.104534 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-19 08:28:03.119750 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
[2020-11-19 08:28:03.127977 ] ERROR Facter::Resolvers::Solaris::Networking - Could not read mac! Error code is: 134
Traceback (most recent call last):
 12: from /opt/puppetlabs/puppet/bin/facter:10:in `<main>'
 11: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli_launcher.rb:23:in `start'
 10: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
 9: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
 8: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
 7: from /opt/puppetlabs/puppet/lib/ruby/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
 6: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/cli/cli.rb:114:in `query'
 5: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter.rb:395:in `to_user_output'
 4: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:16:in `format'
 3: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:26:in `format_for_no_query'
 2: from /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/framework/formatters/legacy_fact_formatter.rb:63:in `hash_to_facter_format'
 1: from /opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `pretty_generate'
/opt/puppetlabs/puppet/lib/ruby/2.7.0/json/common.rb:286:in `generate': "\\x87" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

Mihai Buzgau (Jira)

unread,
Dec 9, 2020, 7:23:03 AM12/9/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Change By: Mihai Buzgau
Fix Version/s: FACT 4.0.47
Reply all
Reply to author
Forward
0 new messages