From a4e26b9a908f0751c5a792e30bbe228a5dcc1a75 Mon Sep 17 00:00:00 2001 From: Eric Radman Date: Fri, 19 Aug 2016 14:01:34 -0400 Subject: [PATCH] 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']} --- salt/state.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/state.py b/salt/state.py index 86e8f00bd6..c559ebb249 100644 --- a/salt/state.py +++ b/salt/state.py @@ -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):