salt: salt-ssh sync_grains not working

Description of Issue/Question

I can’t see my custom grains. I use salt-ssh

Steps to Reproduce Issue

salt:/srv # cat salt/_grains/mygrain.py
def mygrain():
    return dict(mygrain='grain ooooooooooooooooooo')
salt:/srv # salt-ssh w123 saltutil.sync_grains
w123:
salt:/srv # salt-ssh w123 grains.items | grep oooo  # --> no match

Versions Report

salt:/srv # salt --versions-report
Salt Version:
           Salt: 2015.8.3

Dependency Versions:
         Jinja2: 2.8
       M2Crypto: 0.22
           Mako: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.1.0
         Python: 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC]
           RAET: Not Installed
        Tornado: 4.3
            ZMQ: 4.1.2
           cffi: 0.8.6
       cherrypy: Not Installed
       dateutil: 2.1
          gitdb: 0.5.4
      gitpython: 0.3.2 RC1
          ioflo: Not Installed
        libnacl: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.6
   mysql-python: Not Installed
      pycparser: 2.10
       pycrypto: 2.6.1
         pygit2: 0.21.2
   python-gnupg: Not Installed
          smmap: 0.8.2
        timelib: Not Installed

System Versions:
           dist: SuSE 12.3 x86_64
        machine: x86_64
        release: 3.7.10-1.40-desktop
         system: openSUSE  12.3 x86_64

What can I do?

Dear experts, can you please advice me (new to salt) how to debug this?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 21 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Persists in 2019.2.0.

actually it does work quite fine if calling salt-ssh with “iWt” keys

salt-ssh -iWt “nodename” grains.items “t” is for rebuilding thin tgz package “W” to remove all files after the deployment

I opened this issue three yeas ago. I do not know what the salt developers think about this. But I know what I will do. I will switch to ansible.