salt
salt copied to clipboard
salt-run cache.grains better error checking for cache presence.
If cache directory is missing (e.g /var/cache/salt/master/minions/ not present) then command
salt-run cache.grains
fails and produces python traceback like...
File "/usr/lib/python2.6/site-packages/salt/runners/cache.py", line 19, in _cdata
for minion in os.listdir(mdir):
OSError: [Errno 2] No such file or directory: '/var/cache/salt/master/minions
##
This may happen if cache is disabled in master config file and cache directory is not created at all.
minion_data_cache: False
but it may not be obvious to the users from the python error.
Thanks, I imagine this will be an easy fix