| 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:
$ 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. |