logging: Try all upstream targets before logging failure #248#715
logging: Try all upstream targets before logging failure #248#715hartmark wants to merge 1 commit into
Conversation
|
https://github.com/containers/common/blob/main/CONTRIBUTING.md#sign-your-prs |
Signed-off-by: Markus Hartung <mail@hartmark.se>
0871a11 to
599f8b8
Compare
I have attributed the change to myself as the change is quite trivial. And any random developer would come up with this fix with or without AI |
| proto: Protocol, | ||
| ) { | ||
| let mut timeout = DEFAULT_TIMEOUT; | ||
| // Remember do not divide by 0. |
There was a problem hiding this comment.
this is removing a unrelated comment
| if !nameservers.is_empty() { | ||
| timeout = Duration::from_secs(5) / nameservers.len() as u32 | ||
| } | ||
| // forward dns request to hosts's /etc/resolv.conf |
There was a problem hiding this comment.
same here the comment is deleted for no reason?
| // request resolved from following resolver so | ||
| // break and don't try other resolvers |
There was a problem hiding this comment.
and again here the comment is removed
| "dns request {} failed: all nameservers exhausted", | ||
| req.id | ||
| ); | ||
| } |
There was a problem hiding this comment.
I don't really see the point in this. this will still spam if you have just one server all or all fail...
I think having the failed requests on debug is fine, no need to spam the journal with the same errors over and over again.
I had AI help me fix this but it seems that with this fix aardvark doesn't spam log about the failures as the second upstream resolver try worked.