-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Skip non-calico ipsets #8387
Skip non-calico ipsets #8387
Conversation
476f9c1
to
9ca2843
Compare
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, generally looking good; a few comments inline; mainly on naming/style suggestions.
Is there any sane way that we could write an FV test for this? How easy is it to get hold of a newer ipset binary to create a "bad" IP set? Could we do
docker run <some off the shelf image> -net=<felix container> ipset create foo bar
perhaps?
Co-authored-by: Shaun Crampton <[email protected]>
@fasaxc adding a test to check this reliably depends on the host's kernel version:
So if we add a test to verify the error and also its fix, it would run differently based on the host. Unless we skip the test based on kernel version. In that case, I prefer to add the test in another PR since it would need more work. WDYT? |
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, thanks for taking my style comments on board; code looks really clean (to me!) now. Let's not add the extra test; sounds like it's too fiddly to do given the kernel limits.
One nit-level comment but I don't need to see it again.
Description
Skip non calico IP sets to prevent hitting unsupported protocol version for ipsets created by other components likes kube proxy. The idea is to run
ipset list -name
to get the list of ipsets, and get more details for calico ipsets by runningipset list [name]
instead of runningipset list
to get all information for all ipsets including non-calico ones.Related issues/PRs
Fixes #8372
Todos
Release Note
Reminder for the reviewer
Make sure that this PR has the correct labels and milestone set.
Every PR needs one
docs-*
label.docs-pr-required
: This change requires a change to the documentation that has not been completed yet.docs-completed
: This change has all necessary documentation completed.docs-not-required
: This change has no user-facing impact and requires no docs.Every PR needs one
release-note-*
label.release-note-required
: This PR has user-facing changes. Most PRs should have this label.release-note-not-required
: This PR has no user-facing changes.Other optional labels:
cherry-pick-candidate
: This PR should be cherry-picked to an earlier release. For bug fixes only.needs-operator-pr
: This PR is related to install and requires a corresponding change to the operator.