Skip to content

[BUG] salt-ssh doesnt work with git_pillar #61861

Description

@alexxy

Description

salt-ssh seems like doesnt work with git plillars (it can read top.sls but cannot read includes sls files)

Setup

salt running on physical machine using gitfs via pygit for states, formulas and pillars

Please be as specific as possible and give set-up details.

  • on-prem machine
  • VM (Virtualbox, KVM, etc. please specify)

Steps to Reproduce the behavior

output running

salt-ssh -l all --hard-crash --refresh  'glpi*' pillar.items
[DEBUG   ] RETCODE glpi-2.ctrl: 0
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] pygit2 git_pillar_provider enabled
[TRACE   ] Loaded git_pillar as virtual git
[DEBUG   ] LazyLoaded git.ext_pillar
[DEBUG   ] Current fetch URL for git_pillar remote 'main git://bridge.ctrl/salt/pillar': git://bridge.ctrl/salt/pillar (desired: git://bridge.ctrl/salt/pillar)
[DEBUG   ] Current refspecs for git_pillar remote 'main git://bridge.ctrl/salt/pillar': ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] (desired: ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'])
[DEBUG   ] Current http.sslVerify for git_pillar remote 'main git://bridge.ctrl/salt/pillar': true (desired: true)
[DEBUG   ] Set update lock for git_pillar remote 'main git://bridge.ctrl/salt/pillar'
[DEBUG   ] Fetching git_pillar remote 'main git://bridge.ctrl/salt/pillar'
[DEBUG   ] git_pillar remote 'main git://bridge.ctrl/salt/pillar' is up-to-date
[DEBUG   ] Removed update lock for git_pillar remote 'main git://bridge.ctrl/salt/pillar'
[DEBUG   ] git_pillar is processing pillar SLS from /var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414 for pillar env 'main'
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded jinja.render
[DEBUG   ] LazyLoaded yaml.render
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] compile template: /var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414/top.sls
[DEBUG   ] Jinja search path: ['/var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414']
[DEBUG   ] Using importlib_metadata to load entry points
[PROFILE ] Time (in seconds) to render '/var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414/top.sls' using 'jinja' renderer: 0.025183677673339844
[DEBUG   ] Rendered data from file: /var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414/top.sls:
base:
  '*':
    - portage
  'outss*':
    - pum-outss


[DEBUG   ] Results of YAML rendering: 
OrderedDict([('base', OrderedDict([('*', ['portage']), ('outss*', ['pum-outss'])]))])
[PROFILE ] Time (in seconds) to render '/var/tmp/.root_d06d47_salt/running_data/var/cache/salt/minion/git_pillar/2da99e74f842c36e29c8f34a9766adc07aaae4254d689e8b82176776efe4d414/top.sls' using 'yaml' renderer: 0.0005822181701660156
[DEBUG   ] LazyLoaded confirm_top.confirm_top
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded compound_match.match
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] compound_match: glpi-2.ctrl ? *
[DEBUG   ] LazyLoaded glob_match.match
[DEBUG   ] compound_match glpi-2.ctrl ? "*" => "True"
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded compound_match.match
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] compound_match: glpi-2.ctrl ? outss*
[DEBUG   ] LazyLoaded glob_match.match
[DEBUG   ] compound_match glpi-2.ctrl ? "outss*" => "False"
[DEBUG   ] Specified SLS 'portage' in environment 'base' was not found. This is likely caused by a git_pillar top file containing an environment other than the one for the branch in which it resides. Each git_pillar branch/tag must have its own top file.
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded pillar.items
[DEBUG   ] Using importlib_metadata to load entry points
[DEBUG   ] LazyLoaded nested.output
[TRACE   ] data = {'glpi-2.ctrl': {}}
glpi-2.ctrl:
    ----------
[TRACE   ] IPCClient: Connecting to socket: /var/run/salt/master/master_event_pull.ipc
[DEBUG   ] Sending event: tag = salt/job/20220327173909975905/ret/glpi-2.ctrl; data = {'return': {}, 'id': 'glpi-2.ctrl', 'fun': 'pillar.items', 'jid': '20220327173909975905', '_stamp': '2022-03-27T17:39:13.007009'}
[DEBUG   ] Closing IPCMessageClient instance

Expected behavior
salt-ssh should return pillar like this (same setup but not using salt-ssh)

# salt 'glpi-2*' pillar.items
glpi-2.ctrl:
    ----------
    portage:
        ----------
        binrepos:
            http://binpkgs.ctrl
        compileflags:
            -O2 -pipe -march=cascadelake -mtune=cascadelake
        linguas:
            ru en
        mirrors:
            http://distfiles.ctrl
        python_targets:
            python3_9
        rsync:
            rsync://bridge.ctrl/gentoo-portage
        ruby_targets:
            ruby30

Versions Report

# salt --versions-report
Salt Version:
          Salt: 3003.3
 
Dependency Versions:
          cffi: 1.15.0
      cherrypy: Not Installed
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.0.3
       libgit2: 1.4.1
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.3
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.21
      pycrypto: 3.14.1
  pycryptodome: 3.14.1
        pygit2: 1.9.0
        Python: 3.9.9 (main, Mar  5 2022, 13:05:41)
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 22.1.0
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: gentoo 2.7 
        locale: utf-8
       machine: x86_64
       release: 5.15.25-gentoo-dist
        system: Linux
       version: Gentoo 2.7 

No activity

Activity on this issue will appear here.

Activity

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

    PillarSalt-SSHbugbroken, incorrect, or confusing behaviorseverity-high2nd top severity, seen by most users, causes major problems

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions