mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adjust loglevels for gitfs errors
The "critical" loglevel should be used for hard failures only.
This commit is contained in:
parent
9d394dfe46
commit
2093bf8d96
1 changed files with 10 additions and 10 deletions
|
@ -572,7 +572,7 @@ def _verify_auth(repo):
|
|||
'''
|
||||
Helper function to log errors about missing auth parameters
|
||||
'''
|
||||
log.error(
|
||||
log.critical(
|
||||
'Incomplete authentication information for remote {0}. Missing '
|
||||
'parameters: {1}'.format(remote_url, ', '.join(missing))
|
||||
)
|
||||
|
@ -595,7 +595,7 @@ def _verify_auth(repo):
|
|||
user = address.split('@')[0]
|
||||
if user == address:
|
||||
# No '@' sign == no user. This is a problem.
|
||||
log.error(
|
||||
log.critical(
|
||||
'Password / keypair specified for remote {0}, but remote '
|
||||
'URL is missing a username'.format(repo['url'])
|
||||
)
|
||||
|
@ -620,7 +620,7 @@ def _verify_auth(repo):
|
|||
return True
|
||||
if password_ok:
|
||||
if transport == 'http' and not repo['insecure_auth']:
|
||||
log.error(
|
||||
log.critical(
|
||||
'Invalid configuration for gitfs remote {0}. '
|
||||
'Authentication is disabled by default on http remotes. '
|
||||
'Either set gitfs_insecure_auth to True in the master '
|
||||
|
@ -636,7 +636,7 @@ def _verify_auth(repo):
|
|||
missing_auth = [x for x in required_params if not bool(repo[x])]
|
||||
_incomplete_auth(repo['url'], missing_auth)
|
||||
else:
|
||||
log.error(
|
||||
log.critical(
|
||||
'Invalid configuration for remote {0}. Unsupported transport '
|
||||
'{1!r}.'.format(repo['url'], transport)
|
||||
)
|
||||
|
@ -700,7 +700,7 @@ def init():
|
|||
salt.utils.repack_dictlist(remote[repo_url]).items()]
|
||||
)
|
||||
if not per_remote_conf:
|
||||
log.error(
|
||||
log.critical(
|
||||
'Invalid per-remote configuration for gitfs remote {0}. '
|
||||
'If no per-remote parameters are being specified, there '
|
||||
'may be a trailing colon after the URL, which should be '
|
||||
|
@ -811,7 +811,7 @@ def init():
|
|||
'{0}'.format(exc))
|
||||
if provider == 'gitpython':
|
||||
msg += ' Perhaps git is not available.'
|
||||
log.error(msg, exc_info_on_loglevel=logging.DEBUG)
|
||||
log.critical(msg, exc_info_on_loglevel=logging.DEBUG)
|
||||
_failhard()
|
||||
|
||||
if new_remote:
|
||||
|
@ -1189,14 +1189,14 @@ def update():
|
|||
try:
|
||||
refs_post = client.fetch(path, repo['repo'])
|
||||
except dulwich.errors.NotGitRepository:
|
||||
log.critical(
|
||||
log.error(
|
||||
'Dulwich does not recognize remote {0} as a valid '
|
||||
'remote URL. Perhaps it is missing \'.git\' at the '
|
||||
'end.'.format(repo['url'])
|
||||
)
|
||||
continue
|
||||
except KeyError:
|
||||
log.critical(
|
||||
log.error(
|
||||
'Local repository cachedir {0!r} (corresponding '
|
||||
'remote: {1}) has been corrupted. Salt will now '
|
||||
'attempt to remove the local checkout to allow it to '
|
||||
|
@ -1207,7 +1207,7 @@ def update():
|
|||
try:
|
||||
salt.utils.rm_rf(repo['cachedir'])
|
||||
except OSError as exc:
|
||||
log.critical(
|
||||
log.error(
|
||||
'Unable to remove {0!r}: {1}'
|
||||
.format(repo['cachedir'], exc)
|
||||
)
|
||||
|
@ -1635,7 +1635,7 @@ def _file_lists(load, form):
|
|||
try:
|
||||
os.makedirs(list_cachedir)
|
||||
except os.error:
|
||||
log.critical('Unable to make cachedir {0}'.format(list_cachedir))
|
||||
log.error('Unable to make cachedir {0}'.format(list_cachedir))
|
||||
return []
|
||||
list_cache = os.path.join(
|
||||
list_cachedir,
|
||||
|
|
Loading…
Add table
Reference in a new issue