Skip to content

Commit

Permalink
Merge pull request saltstack#22398 from cachedout/catch_failed_engine
Browse files Browse the repository at this point in the history
Catch and log failed engine starts
  • Loading branch information
thatch45 committed Apr 7, 2015
2 parents 8c2878c + 668fa35 commit 7c54036
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion salt/engines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
# Import python libs
from __future__ import absolute_import
import multiprocessing
import logging

# Import salt libs
import salt
import salt.loader

log = logging.getLogger(__name__)


def start_engines(opts, proc_mgr):
'''
Expand Down Expand Up @@ -70,4 +73,7 @@ def run(self):
self.funcs,
self.runners)
kwargs = self.config or {}
self.engine[self.fun](**kwargs)
try:
self.engine[self.fun](**kwargs)
except Exception as exc:
log.critical('Engine {0} could not be started! Error: {1}'.format(self.engine, exc))

0 comments on commit 7c54036

Please sign in to comment.