Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-2018

Google Compute Engine metadata facts need endpoint change

    Details

    • Template:
    • Team:
      Night's Watch
    • Story Points:
      2
    • Sprint:
      NW - 2019-10-02
    • Method Found:
      Needs Assessment
    • Release Notes:
      Known Issue
    • Release Notes Summary:
      Google Compute Engine's internal metadata service will be deprecating the 'v1beta1' endpoint sometime before the end of 2019. Facter now uses the 'v1' endpoint instead.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Google Compute Engine's internal metadata service will be deprecating the 'v1beta1' endpoint sometime before end of calendar year 2019. The GCE resolver[1] should be updated to use the 'v1' endpoint instead.

       

      Note that using the 'v1' endpoint also requires setting a custom User-Agent header that was not necessary in the old 'v1beta1' endpoint.  Using 'curl' in a simple bash script as an example, I would need to change,

      curl http://metadata.google.internal/computeMetadata/v1beta1/instance/name

      to this,

      curl -H "Metadata-flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/name

       For more details about GCE metadata, please see https://cloud.google.com/compute/docs/storing-retrieving-metadata

       

       

      [1] https://github.com/puppetlabs/facter/blob/master/lib/src/facts/resolvers/gce_resolver.cc#L243

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                gabriel.nagy Gabriel Nagy
                Reporter:
                erjohnso Eric Johnson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: