puppetlabs / facter

Collect and display system facts
https://puppet.com/open-source/#osp
Apache License 2.0
617 stars 496 forks source link

Facter can't read Gce metadata #2731

Closed jiwonaid closed 3 months ago

jiwonaid commented 3 months ago

Describe the Bug

[2024-06-12 04:58:49.765370 ] DEBUG Facter::Resolvers::Gce - reading Gce metadata
[2024-06-12 04:58:49.787568 ] DEBUG Facter::Util::Resolvers::Http - Trying to connect to http://metadata.google.internal/computeMetadata/v1/?recursive=true&alt=json but got: undefined method `[]' for false:FalseClass
[2024-06-12 04:58:49.787648 ] DEBUG Facter::Resolvers::Gce - Trying to parse result but got: 783: unexpected token at ''

Expected Behavior

Facter should be able to read Gce metadata.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run facter from the GCP VM.

Environment

:~# facter --version
4.7.1

Additional Context

A pull request will be followed.