Jira (FACT-2565) Debian development versions cause fatal error when resolving os.release

12 views
Skip to first unread message

David Schmitt (Jira)

unread,
Apr 20, 2020, 11:05:04 AM4/20/20
to puppe...@googlegroups.com
David Schmitt created an issue
 
Facter / Bug FACT-2565
Debian development versions cause fatal error when resolving os.release
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/04/20 8:04 AM
Environment:

Debian bullseye/sid

Priority: Normal Normal
Reporter: David Schmitt

When running facter on Debian bullseye/sid, the code in https://github.com/puppetlabs/facter-ng/blob/b4917e6244b044bbb1cfa646f4e2fa85f3b12b4e/lib/facts/debian/os/release.rb#L16-L20 fails, because while - in contrast to FACT-2475 - determine_release_for_os does return a value, it does not match facter's expectations. To illustrate, here's the key values from the linked function:

fact_value: "bullseye/sid"
versions: ["bullseye/sid"]

without versions[1] having a value, the gsub fails with the following exception:

david@zion:~/git/puppetlabs-motd (master)$ ruby2.5 /usr/bin/bundle exec facter os.release
#<Thread:0x000055937c5818c0@/home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/framework/core/fact/internal/internal_fact_manager.rb:26 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
	2: from /home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/framework/core/fact/internal/internal_fact_manager.rb:28:in `block (2 levels) in start_threads'
	1: from /home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/framework/core/fact/internal/core_fact.rb:12:in `create'
/home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/facts/debian/os/release.rb:19:in `call_the_resolver': undefined method `gsub' for nil:NilClass (NoMethodError)
Traceback (most recent call last):
	2: from /home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/framework/core/fact/internal/internal_fact_manager.rb:28:in `block (2 levels) in start_threads'
	1: from /home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/framework/core/fact/internal/core_fact.rb:12:in `create'
/home/david/gems/ruby/2.5.0/gems/facter-4.0.16/lib/facts/debian/os/release.rb:19:in `call_the_resolver': undefined method `gsub' for nil:NilClass (NoMethodError)
david@zion:~/git/puppetlabs-motd (master)$ 

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

David Schmitt (Jira)

unread,
Apr 20, 2020, 11:07:04 AM4/20/20
to puppe...@googlegroups.com
David Schmitt updated an issue
Change By: David Schmitt
Affects Version/s: FACT 4.0.14
Affects Version/s: FACT 4.0.15
Affects Version/s: FACT 4.0.16

Mihai Buzgau (Jira)

unread,
Apr 21, 2020, 2:16:05 AM4/21/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Apr 21, 2020, 2:16:05 AM4/21/20
to puppe...@googlegroups.com

Mihai Buzgau (Jira)

unread,
Apr 21, 2020, 2:16:05 AM4/21/20
to puppe...@googlegroups.com

Andrei Filipovici (Jira)

unread,
Apr 21, 2020, 3:38:03 AM4/21/20
to puppe...@googlegroups.com

David Schmitt (Jira)

unread,
Apr 22, 2020, 11:37:03 AM4/22/20
to puppe...@googlegroups.com
David Schmitt commented on Bug FACT-2565
 
Re: Debian development versions cause fatal error when resolving os.release

works for me:

operatingsystem => Debian
operatingsystemmajrelease => bullseye/sid
operatingsystemrelease => bullseye/sid
osfamily => Debian

Reply all
Reply to author
Forward
0 new messages