Merge pull request #33652 from terminalmage/zh723

Lower the log level for failed auths
This commit is contained in:
Mike Place 2016-06-01 09:37:09 -07:00
commit 7bce4ece1a

View file

@ -532,7 +532,16 @@ class ZeroMQReqServerChannel(salt.transport.mixins.auth.AESReqServerMixin, salt.
payload = self.serial.loads(payload[0])
payload = self._decode_payload(payload)
except Exception as exc:
log.error('Bad load from minion: %s: %s', type(exc).__name__, exc)
exc_type = type(exc).__name__
if exc_type == 'AuthenticationError':
log.debug(
'Minion failed to auth to master. Since the payload is '
'encrypted, it is not known which minion failed to '
'authenticate. It is likely that this is a transient '
'failure due to the master rotating its public key.'
)
else:
log.error('Bad load from minion: %s: %s', exc_type, exc)
stream.send(self.serial.dumps('bad load'))
raise tornado.gen.Return()