salt: Metadata Server Grains (metadata_server_grains) doesn't work in Google anymore

Description of Issue/Question

Google Instances don’t respond to http://169.254.169.254/latest anymore. It was likely an endpoint they had for compatibility until they built out their own system.

Setup

metadata_server_grains: True

Steps to Reproduce Issue

Load up a Google Compute Instance (GCE) with custom metadata and check the URL http://169.254.169.254/latest for that data.

The new URL that is needed is http://metadata.google.internal/computeMetadata/v1/instance/attributes/ (direct to IP also works http://169.254.169.254/computeMetadata/v1/instance/attributes/) and it requires the header Metadata-Flavor: Google

More details available at https://cloud.google.com/compute/docs/storing-retrieving-metadata

Versions Report

Salt Version:
           Salt: 2019.2.0
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.15rc1 (default, Nov 12 2018, 14:31:15)
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5
 
System Versions:
           dist: Ubuntu 18.04 bionic
         locale: UTF-8
        machine: x86_64
        release: 4.15.0-1028-gcp
         system: Linux
        version: Ubuntu 18.04 bionic

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 27 (9 by maintainers)

Commits related to this issue

Most upvoted comments

@sagetherage Thanks for reopening this. Looking forward to Stalebot being replaced with something that works.