Jira (FACT-1956) EC2 Metadata Broken with Facter 2.5.4 - Works Fine in 2.5.1

13 views
Skip to first unread message

Sean Kumar (JIRA)

unread,
Jul 17, 2019, 12:48:03 PM7/17/19
to puppe...@googlegroups.com
Sean Kumar created an issue
 
Facter / Bug FACT-1956
EC2 Metadata Broken with Facter 2.5.4 - Works Fine in 2.5.1
Issue Type: Bug Bug
Assignee: Unassigned
Components: CLI, Community
Created: 2019/07/17 9:47 AM
Environment:

Linux ip-10-3-2-218 4.9.70-25.242.amzn1.x86_64 #1 SMP Wed Jan 3 05:36:22 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Priority: Critical Critical
Reporter: Sean Kumar

Facter at version 2.5.4 can no longer read and display facts from EC2 Metadata in AWS. 

 

Facter @ 2.5.4

[root@ip-10-3-2-87 log]# facter | grep ec2
serialnumber => ec23a2bd-0a32-7111-8ee9-ecd6038d22d0

Facter @ 2.5.1

[root@ip-10-3-2-85 vkumase]# facter | grep ec2
 
domain => ec2.internal
 
ec2_ami_id => ami-923b64e8
 
ec2_ami_launch_index => 0
 
ec2_ami_manifest_path => (unknown)
 
ec2_block_device_mapping_ami => /dev/xvda
 
ec2_block_device_mapping_ebs1 => xvdcz
 
ec2_block_device_mapping_root => /dev/xvda
 
ec2_events_maintenance_history => []
 
ec2_events_maintenance_scheduled => []
 
ec2_hostname => ip-10-3-2-85
 
ec2_iam_info_0 => {
 
ec2_iam_info_1 =>   "Code" : "Success",
 
ec2_iam_info_2 =>   "LastUpdated" : "2019-07-17T15:54:48Z",

This will break all Puppet modules that are using EC2 metadata as a fact in older puppet installations. 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Sean Kumar (JIRA)

unread,
Jul 17, 2019, 12:50:03 PM7/17/19
to puppe...@googlegroups.com
Sean Kumar updated an issue
Change By: Sean Kumar
Method Found: Needs Assessment Other (please specify in description)

Sean Kumar (JIRA)

unread,
Jul 17, 2019, 12:51:03 PM7/17/19
to puppe...@googlegroups.com
Sean Kumar updated an issue
Facter at version 2.5.4 can no longer read and display facts from EC2 Metadata in AWS.  This has been breaking our puppet runs across Puppet and Dev environments, as on bootstrap we're automatically pulling the latest in the 2.x series. 

 

Facter @ 2.5.4
{code:java}

[root@ip-10-3-2-87 log]# facter | grep ec2
serialnumber => ec23a2bd-0a32-7111-8ee9-ecd6038d22d0
{code}
Facter @ 2.5.1
{code:java}

[root@ip-10-3-2-85 vkumase]# facter | grep ec2

domain => ec2.internal

ec2_ami_id => ami-923b64e8

ec2_ami_launch_index => 0

ec2_ami_manifest_path => (unknown)

ec2_block_device_mapping_ami => /dev/xvda

ec2_block_device_mapping_ebs1 => xvdcz

ec2_block_device_mapping_root => /dev/xvda

ec2_events_maintenance_history => []

ec2_events_maintenance_scheduled => []

ec2_hostname => ip-10-3-2-85

ec2_iam_info_0 => {

ec2_iam_info_1 =>   "Code" : "Success",

ec2_iam_info_2 =>   "LastUpdated" : "2019-07-17T15:54:48Z",
{code}

This will break all Puppet modules that are using EC2 metadata as a fact in older puppet installations. 

Mihai Buzgau (JIRA)

unread,
Jul 18, 2019, 10:34:03 AM7/18/19
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug FACT-1956
 
Re: EC2 Metadata Broken with Facter 2.5.4 - Works Fine in 2.5.1

hey Sean Kumar,

We believe the EC2 facts were not displayed because of this commit: https://github.com/puppetlabs/facter/commit/e7ed9ffb0afd7868a7772ee4eb03b39a11a6456d that changed the open_timeout from the default 60 seconds to 0.5 seconds.

We've reverted the commit and published a new gem to rubygems - version 2.5.5

Mihai Buzgau (JIRA)

unread,
Jul 22, 2019, 1:53:03 AM7/22/19
to puppe...@googlegroups.com
Mihai Buzgau commented on Bug FACT-1956

Sean Kumar were you able to validate that this issue is resolved with the 2.5.5 version of facter gem ?

Sean Kumar (JIRA)

unread,
Jul 22, 2019, 10:14:02 AM7/22/19
to puppe...@googlegroups.com
Sean Kumar commented on Bug FACT-1956

Hey Mihai Buzgau - I can confirm the ec2 facts are loading fine with 2.5.5, that PR was definitely the cause. Thank you for the quick turn around!

Sean Kumar (JIRA)

unread,
Jul 22, 2019, 10:15:03 AM7/22/19
to puppe...@googlegroups.com
Sean Kumar assigned an issue to Mihai Buzgau
 
Change By: Sean Kumar
Resolution: Fixed
Assignee: Mihai Buzgau
Status: Open Resolved
Reply all
Reply to author
Forward
0 new messages