salt icon indicating copy to clipboard operation
salt copied to clipboard

sync_grains should force-refresh grains cache

Open cachedout opened this issue 12 years ago • 3 comments

Otherwise we don't see new grains on sync, which is undesirable.

cachedout avatar Feb 06 '14 22:02 cachedout

When targetting nodes with the new custom grains "salt -G 'custom_key:custom_value' test.ping" nothing returns even after running salt saltutil.sync_all from the master. Although running "salt-run grains.items" from the minion hosts the custom grains shows fine as well as running "salt-run cache.grains" from the master, the custom grains are listed. The work around I've been doing is to restart all minion service.

wongster80 avatar May 07 '14 23:05 wongster80

On 2014.1.5 running "salt saltutil.sync_grains" does not require a restart of the salt-minion service anymore.

wongster80 avatar Jun 26 '14 01:06 wongster80

First, sorry for responding to an old issue, but I still see this happening with 2015.5.2.

       Salt: 2015.5.2
       Python: 2.6.6 (r266:84292, Jan 22 2014, 01:49:05)
       Jinja2: unknown
       M2Crypto: 0.20.2
       msgpack-python: 0.1.13
       msgpack-pure: Not Installed
       pycrypto: 2.0.1
       libnacl: Not Installed
       PyYAML: 3.10
       ioflo: Not Installed
       PyZMQ: 14.5.0
       RAET: Not Installed
       ZMQ: 4.0.5
       Mako: Not Installed

Running "salt-run grains.items" from the minion hosts the custom grains shows fine as well as running "salt-run cache.grains" from the master, the custom grains are listed. Restarting the minion did fix the issue, which I thought was no longer necessary.

gmcwhistler avatar Jul 15 '15 15:07 gmcwhistler