RetryDecorator shouldn't be logging warnings and errors for expected exceptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.service |
Fix Released
|
Medium
|
Matt Riedemann |
Bug Description
The loopingcall.
For each retry, the expected exception is logged at warning level, along with it's stacktrace:
https:/
And if we actually timeout, the final exception is logged at error level:
https:/
This is bad practice because only the caller of the method being retried has context as to what's going on and knows what level things should be logged at (and if tracebacks should be logged at all). I'd guess that in most cases where a retry decorator is needed anyway is when waiting for something to show up or be gone, and those aren't really reasons to be logging warnings/errors.
It'd be fine to log debug messages to show progress, but if we fail the retry and timeout, that's when the caller should handle the exception and do the appropriate logging.
Changed in oslo.service: | |
importance: | Undecided → Medium |
assignee: | nobody → Matt Riedemann (mriedem) |
description: | updated |
Changed in oslo.service: | |
status: | In Progress → Fix Released |
Also:
http:// specs.openstack .org/openstack/ openstack- specs/specs/ log-guidelines. html#definition -of-log- levels
"Error: Serious issue with cloud, administrator should be notified immediately via email/pager. On call people expected to respond."