Merge pull request #27182 from Awingu/2015.8

fix restart_on_error
This commit is contained in:
Mike Place 2015-09-17 11:24:01 -06:00
commit 8f8e75c5ff
3 changed files with 10 additions and 12 deletions

View File

@ -270,12 +270,6 @@ class Minion(parsers.MinionOptionParser): # pylint: disable=no-init
if check_user(self.config['user']):
logger.info('The salt minion is starting up')
self.minion.tune_in()
except (KeyboardInterrupt, SaltSystemExit) as exc:
logger.warn('Stopping the Salt Minion')
if isinstance(exc, KeyboardInterrupt):
logger.warn('Exiting on Ctrl-c')
else:
logger.error(str(exc))
finally:
self.shutdown()

View File

@ -38,7 +38,7 @@ import salt.utils.rsax931
import salt.utils.verify
import salt.version
from salt.exceptions import (
AuthenticationError, SaltClientError, SaltReqTimeoutError
AuthenticationError, SaltClientError, SaltReqTimeoutError, SaltSystemExit
)
import tornado.gen
@ -550,7 +550,7 @@ class AsyncAuth(object):
'Salt Minion.\nThe master public key can be found '
'at:\n{1}'.format(salt.version.__version__, m_pub_fn)
)
sys.exit(42)
raise SaltSystemExit('Invalid master key')
if self.opts.get('syndic_master', False): # Is syndic
syndic_finger = self.opts.get('syndic_finger', self.opts.get('master_finger', False))
if syndic_finger:

View File

@ -108,10 +108,14 @@ class AsyncRemotePillar(object):
'cmd': '_pillar'}
if self.ext:
load['ext'] = self.ext
ret_pillar = yield self.channel.crypted_transfer_decode_dictentry(
load,
dictkey='pillar',
)
try:
ret_pillar = yield self.channel.crypted_transfer_decode_dictentry(
load,
dictkey='pillar',
)
except:
log.exception('Exception getting pillar:')
raise SaltClientError('Exception getting pillar.')
if not isinstance(ret_pillar, dict):
msg = ('Got a bad pillar from master, type {0}, expecting dict: '