-
Notifications
You must be signed in to change notification settings - Fork 672
[WIP] Workaround to fix Kernel bug related ipset entry deletion #3373
base: master
Are you sure you want to change the base?
Conversation
28c45fa
to
28a9444
Compare
Kernel versions are a poor indicator as to what functionality/bugs are present, since some distros aggressively backport changes. |
Ok, i will check if there is more reliable way. Nevertheless adding this workaround will add little overhead if Kernel is already has the fix and will not cause any side-affects. |
28a9444
to
c3ab8f2
Compare
If I read it right, you are triggering off the error message we saw in #3296, but the bug will hit earlier. |
if the kernel version is in affected range of Kernels, then resync the entries to expected set of entries. Kernel bug: https://bugzilla.netfilter.org/show_bug.cgi?id=1119 Fixes #3296 failed: ipset v6.32: Element cannot be deleted from the set: it's not added
c3ab8f2
to
8c0d584
Compare
Is it still WIP (as the tittle suggests) or is it ready for a review? |
@brb Key logic to detect if the Kernel has the bug is not reliable. As pointed out Kernel version is not the best way to figure if it has ipset bug. Do you have any better way to reliably figure if Kernel is affected with ipset issue? |
I wouldn't bother with checking the kernel version, and I would enable the safe-delete for all. Also, as we already bookkeeping all ipset elements in NPC, wouldn't it better to compare against the ones in NPC instead of |
@brb agree, its little bit of overhead but I can not think of any other way to find if the kernel is affected with the bug
Could you point me where bookkeeping of ipset elements is done? My intent is since its helper function, we don't know who the consumers are if they do any bookkeeping etc. Ideally would like to contain the changes with in the helper function without taking any help from the consumer of this utility library. |
E.g. https://github.com/weaveworks/weave/blob/master/npc/selector.go#L170. I'm suggesting to always sync with the tracked by NPC ipsets as these are the source of truth. |
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.
stale PR
if the kernel version is in affected range of Kernels, then resync the entries to
expected set of entries.
https://bugzilla.netfilter.org/show_bug.cgi?id=1119
Fixes #3296 failed: ipset v6.32: Element cannot be deleted from the set: it's not added