Open yrro opened 8 months ago
Thanks for the patch. I'll try to review it soon.
I don't think including a traceback is necessary when a timeout occurs. I think this would lead to confusion in users thinking that this is a code issue and not merely a timeout. If it is persistent then users can debug logging to identify where it is timing out.
I set timeout=1 and ran --source ipahealthcheck.ipa.certs and the tracebacks don't really tell what is going on other than reads are failing (which isn't the root cause of the issue).
With these changes, it's a lot more obvious when reported errors are caused by a health check timeout.
One other significant change: when a plugin is interrupted by a timeout, a
CRITICAL
result is returned with the keyhealthcheck_timeout
.TimeoutException
and does not throw anything, thehealthcheck_timeout
result is still returned - previously there would be no failures raised by the pluginTimeoutException
and raises its own exception, there will now be two failures returned, because the plugin caller can't know if an exception thrown by a plugin was really caused by aTimeoutException
(well, perhaps it could if it examined the exception chain, that part of Python is a bit new to me, and it relies on the plugin code chaining the exception it throws to theTimeoutException
it caught).Fixes: https://github.com/freeipa/freeipa-healthcheck/issues/322