Fix path in log message

The actual error refers to the parent dir of the master/minion/etc. pki
subdir (i.e. /etc/salt/pki instead of /etc/salt/pki/minion). Therefore,
the startswith check needs to look for the parent of the pki_dir.
This commit is contained in:
Erik Johnson 2018-04-16 12:48:06 -05:00
parent 3198ca8b19
commit 8c67ab53b4
No known key found for this signature in database
GPG Key ID: 5E5583C437808F3F

View File

@ -567,8 +567,9 @@ class MinionBase(object):
break
except SaltClientError as exc:
last_exc = exc
pki_dirname = os.path.dirname(opts['pki_dir'])
if exc.strerror.startswith(
'Could not access {0}'.format(opts['pki_dir'])):
'Could not access {0}'.format(pki_dirname)):
msg = exc.strerror
else:
msg = ('Master {0} could not be reached, trying '