saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.22k stars 5.49k forks source link

Pillar rendering silently ignores missing include #55486

Open veym4os opened 4 years ago

veym4os commented 4 years ago

Pillar rendering silently ignores missing include

When including files from pillar's top.sls, the rendering fails if the included file is not available. But when a file is included by an existing file in the pillar, the rendederer silently ignores the error.

Setup

Only pillar required.

# top.sls
base:
  salt1:
    - does_exist
# does_exist.sls
include:
  - does_not_exist

Steps to Reproduce Issue

With the above setup call

salt-call pillar.items

Expected error:

local:
    ----------
    _errors:
        - Specified SLS 'does_not_exist' in environment 'base' is not available on the salt master

Actual result is no error, just an empty pillar:

local:
    ----------

Versions Report

Salt Version:
           Salt: 2019.2.2

Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.8.1
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.33.0
           Mako: Not Installed
   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: 3.6.8 (default, Aug  7 2019, 08:02:28)
   python-gnupg: 0.4.4
         PyYAML: 3.12
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.4.2
            ZMQ: 4.1.4

System Versions:
           dist: oracle 7.7 
         locale: UTF-8
        machine: x86_64
        release: 4.1.12-124.31.1.el7uek.x86_64
         system: Linux
        version: Oracle Linux Server 7.7 
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

sagetherage commented 4 years ago

@garethgreenaway does this ticket still need triage?

stale[bot] commented 4 years ago

Thank you for updating this issue. It is no longer marked as stale.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

sagetherage commented 4 years ago

stable bot stale not!

stale[bot] commented 4 years ago

Thank you for updating this issue. It is no longer marked as stale.

morph027 commented 4 years ago

run into the same issue...

It works with 2018.3 (salt complains about Specified SLS '...' in environment '...' is not available on the salt master), 2019.2 does not complain.

hajdukd commented 4 years ago

@morph027 Is there a way to fail-fast in case any pillar is not available on the master ?

garethgreenaway commented 4 years ago

Thanks everyone, I was able to reproduce this. Looks it broke somewhere in between the 2018.3 and 2019.2 releases.