salt: mine.get unable to target with mine cache data.

Description of Issue

Hi,

Trying to do mine.get and it is not returning results when using grain targeting. This is a multimaster setup with etcd for the cache.

Targeting with glob works; Targeting with grains or compound does not work.

Works: salt-call mine.get '*' grains.item

Does not work: salt-call mine.get 'cpuarch:x86_64' grains.item grain salt-call mine.get 'G@cpuarch:x86_64' grains.item compound

Setup

Minion mine config:

mine_interval: 5
mine_functions:
  grains.item: [fqdn, ipv4, fqdn_ip4]

Steps to Reproduce Issue

salt-call mine.get 'cpuarch:x86_64' grains.item grain

Versions Report

Minion:

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.7.2 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed 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: 2.7.5 (default, Aug 7 2019, 00:51:29) python-gnupg: Not Installed PyYAML: 3.10 PyZMQ: 15.3.0 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.2.1 ZMQ: 4.1.4

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

Master:

Salt Version: Salt: 2019.2.2

Dependency Versions: cffi: Not Installed cherrypy: 17.4.2 dateutil: 2.6.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed ioflo: Not Installed Jinja2: 2.10 libgit2: Not Installed libnacl: Not Installed M2Crypto: Not Installed 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: 2.7.17 (default, Nov 7 2019, 10:07:09) python-gnupg: 0.4.1 PyYAML: 3.12 PyZMQ: 16.0.2 RAET: Not Installed smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.2.5

System Versions: dist: Ubuntu 18.04 bionic locale: UTF-8 machine: x86_64 release: 4.15.0-76-generic system: Linux version: Ubuntu 18.04 bionic

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 29 (14 by maintainers)

Most upvoted comments

Could you try the following:

  • verify on all related minions that salt $minion config.get mine_functions produces the correct result.
  • Flush all previous mine data using salt $minion mine.flush
  • Forcing an update of the mine data using salt $minion mine.update
  • Optionally: verify the targeting grain using salt $minion grains.get cpuarch
  • Then query the salt-mine, using salt $minion mine.get 'cpuarch:x86_64' grains.item grain Of course these could also all be done locally using salt-call instead of salt $minion. I’m interested in where things go awry.