salt icon indicating copy to clipboard operation
salt copied to clipboard

salt-run cache.grains better error checking for cache presence.

Open mlister2006 opened this issue 13 years ago • 1 comments

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.

mlister2006 avatar Mar 29 '13 22:03 mlister2006

Thanks, I imagine this will be an easy fix

thatch45 avatar Mar 29 '13 22:03 thatch45