Provide useful hints for error "No contents found"

Without extensive experience with salt, the following error is confusing:

[ERROR   ] No contents found in top file.

Make this error more intelligible by providing hints about where to look

[ERROR   ] No contents found in top file. Please verify that the 'file_roots' specified in 'etc/master' are accessible: {'base': ['/home/eradman/hg/salT']}
This commit is contained in:
Eric Radman 2016-08-19 14:01:34 -04:00
parent 05636ec25e
commit a4e26b9a90

View File

@ -2606,7 +2606,10 @@ class BaseHighState(object):
)
if found == 0:
log.error('No contents found in top file')
log.error('No contents found in top file. Please verify '
'that the \'file_roots\' specified in \'etc/master\' are '
'accessible: {0}'.format(repr(self.state.opts['file_roots']))
)
# Search initial top files for includes
for saltenv, ctops in six.iteritems(tops):