Merge pull request #32321 from abednarik/minion_start_fail_log

Better message when minion fail to start
This commit is contained in:
Mike Place 2016-04-05 10:28:06 -06:00
commit 64abec94e7
2 changed files with 5 additions and 2 deletions

View file

@ -80,7 +80,7 @@ def minion_process(queue):
minion = salt.cli.daemons.Minion()
minion.start()
except (Exception, SaltClientError, SaltReqTimeoutError, SaltSystemExit) as exc:
log.error('Minion failed to start', exc_info=False)
log.error('Minion failed to start: {0}'.format(exc.message), exc_info=False)
restart = True
except SystemExit as exc:
restart = False

View file

@ -23,7 +23,7 @@ else:
# Import salt libs
from salt.log import is_console_configured
from salt.exceptions import SaltClientError
from salt.exceptions import SaltClientError, SaltSystemExit
import salt.defaults.exitcodes
import salt.utils
@ -173,6 +173,9 @@ def verify_files(files, user):
fp_.write('')
except IOError as err:
if os.path.isfile(dirname):
msg = 'Failed to create path {0}, is {1} a file?'.format(fn_, dirname)
raise SaltSystemExit(msg=msg)
if err.errno != errno.EACCES:
raise
msg = 'No permissions to access "{0}", are you running as the correct user?\n'