saltstack / saltstack/salt

dynamic:instance-identity:document grain is not parsed on Debian 10 Buster

Open
#56,886 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Core Grains severity-high
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
dynamic:instance-identity:document grain is not parsed on Debian 10 Buster. It is a JSON value instead of being parsed.

Comparison of two EC2 instances:

sudo salt --out=yaml c\*__stage__\* grains.item osfinger pythonexecutable dynamic:instance-identity:document
chapters__stage__us-east-2:
  dynamic:instance-identity:document:
    accountId: '[REDACTED]'
    architecture: x86_64
    availabilityZone: us-east-2a
    billingProducts: null
    devpayProductCodes: null
    imageId: ami-0b8193ae73862dccd
    instanceId: i-004930517fd5e82cc
    instanceType: t3.medium
    kernelId: null
    marketplaceProductCodes: null
    pendingTime: '2019-03-29T15:00:23Z'
    privateIp: 10.22.10.18
    ramdiskId: null
    region: us-east-2
    version: '2017-09-30'
  osfinger: Debian-9
  pythonexecutable: /usr/bin/python2
ccengine__stage__us-east-2:
  dynamic:instance-identity:document: "{\n  \"accountId\" : \"[REDACTED]\",\n  \"architecture\"
    : \"x86_64\",\n  \"availabilityZone\" : \"us-east-2b\",\n  \"billingProducts\"
    : null,\n  \"devpayProductCodes\" : null,\n  \"marketplaceProductCodes\" : null,\n
    \ \"imageId\" : \"ami-05d9978d11a05da49\",\n  \"instanceId\" : \"i-0629d310e88d71c31\",\n
    \ \"instanceType\" : \"t3.small\",\n  \"kernelId\" : null,\n  \"pendingTime\"
    : \"2020-04-24T15:45:14Z\",\n  \"privateIp\" : \"10.22.11.12\",\n  \"ramdiskId\"
    : null,\n  \"region\" : \"us-east-2\",\n  \"version\" : \"2017-09-30\"\n}"
  osfinger: Debian-10
  pythonexecutable: /usr/bin/python3

Expected behavior
The individual document values should be accessible (ex. dynamic:instance-identity:document:region).

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 2019.2.3
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.5.3
      docker-py: Not Installed
          gitdb: 2.0.0
      gitpython: 2.1.1
          ioflo: Not Installed
         Jinja2: 2.9.4
        libgit2: 0.24.5
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.24.2
         Python: 2.7.13 (default, Sep 26 2018, 18:42:22)
   python-gnupg: Not Installed
         PyYAML: 3.12
          PyZMQ: 16.0.2
           RAET: Not Installed
          smmap: 2.0.1
        timelib: Not Installed
        Tornado: 4.4.3
            ZMQ: 4.2.1
 
System Versions:
           dist: debian 9.12 
         locale: UTF-8
        machine: x86_64
        release: 4.9.0-12-amd64
         system: Linux
        version: debian 9.12

Additional context
The State and Pillar files are publicly accessible (secrets are encrypted): creativecommons/sre-salt-prime

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. Trace Salt's grain parsing entry point for dynamic:instance-identity:document and compare the Debian 9 and Debian 10 behavior; done means nested values such as dynamic:instance-identity:document:region are accessible instead of remaining a JSON string.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.