Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Closed
mlister2006 opened this Issue Mar 29, 2013 · 1 comment

Comments

Projects
None yet
2 participants
Contributor

mlister2006 commented Mar 29, 2013

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.

Owner

thatch45 commented Mar 29, 2013

Thanks, I imagine this will be an easy fix

@thatch45 thatch45 closed this in 5fb5060 Apr 8, 2013

thatch45 added a commit that referenced this issue Apr 8, 2013

Fix #4323
Add a try/except block around cache lookup since the cachedir might not be there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment