Drop policy check failures to DEBUG

The policy check failures are not actionable by the operator of the
cloud, therefore logging them as ERROR makes them very noisy for a cloud
if someone is hitting an API they're not allowed to talk to.

Nova currently logs this in DEBUG level so it would make sense to be
logging it at the same level.

Change-Id: I2885a246b8e4b1fbd849de15991108b14f4ac8ce
This commit is contained in:
Mohammed Naser 2020-08-28 13:36:29 -04:00 committed by Eric Harney
parent 367e704614
commit d99322ede1
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ def authorize(context, action, target, do_raise=True, exc=None):
LOG.exception('Policy not registered')
except Exception:
with excutils.save_and_reraise_exception():
LOG.error('Policy check for %(action)s failed with context '
LOG.debug('Policy check for %(action)s failed with context '
'%(credentials)s',
{'action': action,
'credentials': context.to_policy_values()})