New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fqdn: fix broken sorting algorithm for DNSZombies #27572
fqdn: fix broken sorting algorithm for DNSZombies #27572
Conversation
1d2c827
to
f9d1640
Compare
/test |
Given this is a bug, I guess we backport it to at least 1.14. I assess the risk of this breaking something as pretty minimal, so might be worth backporting even further, as it's not great to throw away these mappings for live connections 😓. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm, nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the bug fix! Could fix the nit by @giorio94 in the test.
f9d1640
to
a5f9713
Compare
The sorting function for DNSZombies was subtly broken, and didn't do what it advertised. Write some tests to confirm the suspicion and fix the function. Reported-by: Jussi Maki <joamaki@isovalent.com> Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
a5f9713
to
1483680
Compare
/test |
Nominating this for backports all the way to 1.12, as previously mentioned, I assess the risk as low, and this can cause connection drops. |
How would you expect this bug to manifest itself? I'm wondering if it could serve as possible explanation to a problem we have seen recently reported in Slack. |
When over #27870 adds the option of setting the maximum interval for conntrack GC, which should allow configuring it in a way to allow GCing before the |
The FQDN proxy will GC IP addresses that are both: - past their DNS TTLs, and - no longer in use by active connections However, many applications do not immediately re-resolve names between connections, even if the TTL has expired. This can cause traffic to be dropped unexpectedly. Previously, this was not an issue, as FQDN GC happened very rarely. This has been improved, however, by cilium#27572 and cilium#27870. Now, end-users occasionally being surprised by this. This sets the default grace period to 60 seconds, in an attempt to find a good balance between application needs and security. Signed-off-by: Casey Callendrello <cdc@isovalent.com>
The sorting function for DNSZombies was subtly broken, and didn't do what it advertised. Write some tests to confirm the suspicion and fix the function.
Reported-by: Jussi Maki joamaki@isovalent.com