Merge pull request #40961 from terminalmage/issue40948

Make error more explicit when PKI dir not present for salt-call
This commit is contained in:
Nicole Thomas 2018-04-18 12:08:16 -04:00 committed by GitHub
commit 87ca2b4003
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -567,8 +567,15 @@ class MinionBase(object):
break
except SaltClientError as exc:
last_exc = exc
msg = ('Master {0} could not be reached, trying '
'next master (if any)'.format(opts['master']))
if exc.strerror.startswith('Could not access'):
msg = (
'Failed to initiate connection with Master '
'{0}: check ownership/permissions. Error '
'message: {1}'.format(opts['master'], exc)
)
else:
msg = ('Master {0} could not be reached, trying '
'next master (if any)'.format(opts['master']))
log.info(msg)
continue