Closed arossert closed 2 years ago
@arossert Can you elaborate "older AWS instance"? What exactly is old?
It was created at Sun Oct 27 2019 11:00:59 GMT+0200 (Israel Standard Time) (over 2 years)
@kshivakumar @dgzlopes I did some digging on my instance and discovered that the information exists in /sys/class/dmi/id/bios_vendor
[root@centos]# cat /sys/class/dmi/id/bios_vendor
Amazon EC2
But it does not exist in this file on other (newer) instances, so I can just assume that the metadata API was changed over the years and the same for the content of the dmi files.
I will create a PR
Resolved by #17
I have an older AWS instance that is not detected, after investigating I noticed 2 issues
/sys/class/dmi/id/product_version
file is emptyhttp://169.254.169.254/latest/dynamic/instance-identity/document
call returnsContent-Type: text/plain
, this cause theresponse.json()
function to failWill you accept a PR to ignore the content-type header?
response.json(content_type=None)
Also maybe the file flow can be revisited, do we have to look at the file content? isn't it good enough if it exists?