mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
extend #488588 to cover SyncAuth class
the original fix was only covered asyncauth, but the syncauth method overrode the fix. This patch duplicates it so behavior should be consistent in both codepaths.
This commit is contained in:
parent
395bae6486
commit
a3594db10f
1 changed files with 11 additions and 3 deletions
|
@ -1097,9 +1097,17 @@ class SAuth(AsyncAuth):
|
|||
creds = self.sign_in(channel=channel)
|
||||
if creds == 'retry':
|
||||
if self.opts.get('caller'):
|
||||
print('Minion failed to authenticate with the master, '
|
||||
'has the minion key been accepted?')
|
||||
sys.exit(2)
|
||||
# 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):
|
||||
error = SaltClientError('Minion failed to authenticate'
|
||||
' with the master, has the '
|
||||
'minion key been accepted?')
|
||||
break
|
||||
else:
|
||||
print('Minion failed to authenticate with the master, '
|
||||
'has the minion key been accepted?')
|
||||
sys.exit(2)
|
||||
if acceptance_wait_time:
|
||||
log.info('Waiting {0} seconds before retry.'.format(acceptance_wait_time))
|
||||
time.sleep(acceptance_wait_time)
|
||||
|
|
Loading…
Add table
Reference in a new issue