chef / ohai

Ohai profiles your system and emits JSON
https://docs.chef.io/ohai.html
Apache License 2.0
681 stars 452 forks source link

[17.9.0] EC2 metadata missing `network-card` information #1795

Open gmarciani opened 1 year ago

gmarciani commented 1 year ago

Description

The EC2 metadata populated by Ohai is missing the network-card information, that is the info returned by the call to the IMDS endpoint: http://169.254.169.254/latest/meta-data/network/interfaces/macs/#{mac}/network-card

Ohai Version

17.9.0

Platform Version

EC2 instance of type c6in.metal with OS Amazon Linux 2

Ohai Output

node['ec2']['network_interfaces_macs']={"02:0f:3b:3a:20:13"=>{"device_number"=>"0", "interface_id"=>"eni-05ba4c04a0387e63c", "local_hostname"=>"REDACTED", "local_ipv4s"=>"3.5.133.26", "mac"=>"02:0f:3b:3a:20:13", "owner_id"=>"REDACTED", "security_group_ids"=>"sg-02f630ea819473b6d", "security_groups"=>"multinics-20230411-2-ComputeSecurityGroup-58F3243PFHZR", "subnet_id"=>"subnet-0b4cfba344624eb40", "subnet_ipv4_cidr_block"=>"3.5.128.0/19", "vpc_id"=>"vpc-05ec963dc8f4636dc", "vpc_ipv4_cidr_block"=>"REDACTED", "vpc_ipv4_cidr_blocks"=>"REDACTED"},