Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
mlister2006 opened this Issue · 1 comment

2 participants

@mlister2006

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.

@thatch45
Owner

Thanks, I imagine this will be an easy fix

@thatch45 thatch45 closed this issue from a commit
@thatch45 thatch45 Fix #4323
Add a try/except block around cache lookup since the cachedir might not be there
5fb5060
@thatch45 thatch45 closed this in 5fb5060
@thatch45 thatch45 referenced this issue from a commit
@thatch45 thatch45 Fix #4323
Add a try/except block around cache lookup since the cachedir might not be there
f370382
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.