Skip to content

[BUG] Pillar salt['match.compound'] returns different result than salt-run 'match.compound'  #58407

Closed

Description

@thoro

Description
I am using salt['match.compound'] in my pillar files, I upgraded from 2017.7 to 3001.1, now those matches do not work anymore.

Setup
The following snippet should return True in the what variable, but it returns false.

test:
    what: {{ salt['match.compound']('E@' + salt['grains.item']('host')['host'])}}
    who: {{salt['grains.item']('host')}}

Steps to Reproduce the behavior

The pillar with the previous config looks like this:

test:
        ----------
        what:
            False
        who:
            ----------
            host:
                creamdata-front-1-19

When running the function via salt-call:

salt-call match.compound 'E@creamdata-front-1-19'
local:
    True

It returns the expected value.

Expected behavior

Value should be true, if the hostname matches, just like in 2017.7

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 3001.1

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.11.1
        libgit2: Not Installed
       M2Crypto: 0.35.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: Not Installed
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 3.6.8 (default, Apr  2 2020, 13:34:55)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 17.0.0
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4

System Versions:
           dist: centos 7 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-1062.4.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7 Core

Master and Minion are the same version.

Additional context

Activity

  1. added
    bug
    on Sep 9, 2020
  2. assigned and unassigned on Sep 23, 2020
  3. added
    severity-high
    and removed on Oct 7, 2020
  4. added this to the Approved milestone on Oct 7, 2020
  5. removed their assignment
    on Oct 7, 2020
  6. added
    Phosphorus v3005.0
    on Jun 18, 2021
  7. removed
    Phosphorus v3005.0
    on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugseverity-high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions