Jira (FACT-3092) Retrieve of two facts consecutively via API fails with facter 4.2.5

6 views
Skip to first unread message

Adam Tkac (Jira)

unread,
Nov 9, 2021, 10:25:02 AM11/9/21
to puppe...@googlegroups.com
Adam Tkac created an issue
 
Facter / Bug FACT-3092
Retrieve of two facts consecutively via API fails with facter 4.2.5
Issue Type: Bug Bug
Affects Versions: FACT 4.2.5
Assignee: Unassigned
Created: 2021/11/09 7:24 AM
Environment:

Linux, CentOS 8.4

  1. ruby -v
    ruby 2.5.9p229 (2021-04-05 revision 67939) [x86_64-linux]

facter 4.2.5

Priority: Normal Normal
Reporter: Adam Tkac

Hello facter upstream,

During upgrade of facter from version 4.0.51 to 4.2.5, we spotted issue that on our AWS EC2 instances facter API fails to retrieve some facts when we call Facter.value multiple times in a row.

Reproducer:

$ facter -v
4.2.5

$ cat test.rb
#!/usr/bin/env ruby
 
require 'facter'
 
ip_local = Facter.value(:ec2_local_ipv4)
ip_public = Facter.value(:ec2_public_ipv4)
 
puts "ip_local:#{ip_local}\nip_public:#{ip_public}\n"

$ ./test.rb
ip_local:10.254.9.45
ip_public:

However when we call facter directly from command line, everything works fine:

# facter ec2_local_ipv4 ec2_public_ipv4
ec2_local_ipv4 => 10.254.9.45
ec2_public_ipv4 => X.X.X.redacted

Also, when I tried to obtain only ec2_public_ipv4 fact via API, it works well, problem is only when I try to obtain more than 1 fact via API.

Please let me know if you need more information.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Ciprian Badescu (Jira)

unread,
Nov 11, 2021, 9:30:03 AM11/11/21
to puppe...@googlegroups.com
Ciprian Badescu commented on Bug FACT-3092
 
Re: Retrieve of two facts consecutively via API fails with facter 4.2.5

Adam Tkac, can you provide us a way to reproduce the issue (e.g. definition of ec2_local_ipv4/ec2_public_ipv4 facts)?

Ciprian Badescu (Jira)

unread,
Dec 2, 2021, 1:29:02 PM12/2/21
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages