If the channel send is sucessful and does not raise an exception, we set ret to True, in case a previous exception from a previous channel send to another master has sent it to False.

This commit is contained in:
Gareth J. Greenaway 2018-07-13 15:38:09 -07:00
parent 8d1551c5fb
commit bf78f4b188
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41
2 changed files with 3 additions and 3 deletions

View file

@ -523,10 +523,9 @@ class AsyncAuth(object):
# We have a list of masters, so we should break
# and try the next one in the list.
if self.opts.get('local_masters', None):
log.debug('=== opts %s ===', self.opts['master'])
error = SaltClientError('Minion failed to authenticate'
'with the master, has the has'
'the minion key been accepted?')
' with the master, has the '
'minion key been accepted?')
break
else:
print('Minion failed to authenticate with the master, '

View file

@ -84,6 +84,7 @@ def fire_master(data, tag, preload=None):
channel = salt.transport.Channel.factory(__opts__, master_uri=master)
try:
channel.send(load)
ret = True
except Exception:
ret = False
return ret