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
ctmap: do not call InitMapInfo() in init() #15590
Conversation
test-me-please |
This will fix #15337, right? |
8381ed9
to
e50fd3e
Compare
That's the intention, yes. |
test-me-please |
f877ec0
to
722000a
Compare
test-me-please |
722000a
to
1286095
Compare
test-me-please |
1286095
to
e2694a7
Compare
PR #14721 introduced changes that removed the cilium_snat_v{4,6}_external maps if NodePort is not enabled. Issue #15141 was attributed to the above PR, where controllers were failing with: > error=Unable to get object /sys/fs/bpf/tc/globals/cilium_snat_v4_external: no such file or directory name=bpf-map-sync-cilium_snat_v4_external In an attempt to fix #15141, #15175 added a nodeport argument to InitMapInfo() so that the cilium_snat_v{4,6}_external maps are not created if NodePort is not enabled. PR #15141 did not fix the issue: #15337 (comment) This PR takes another shot at fixing #15141 by removing a call of InitMapInfo from init(), where the (new) nodeport argument is always true. Not that in init(), option.Config.EnableNodePort is not properly set yet, so we cannot pass the config option because it would always be false. For this change to properly work, this patch also adds explicit InitMapInfo() calls since removing init() means that this function is called in contexts such as tests and the cli. Fixes: cac5218 Fixes: d639905 Fixes: #15141 Fixes: #15337 Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
e2694a7
to
e89b4bb
Compare
test-me-please |
test-gke |
retest-net-next |
retest-runtime |
There are currently two failures: one for gke-stable with a "Build Scaling cluster failed" and another one that looks like a flake: #15621. So, I will mark the PR as Ready for review. |
@kkourt I think there is still one case where we might wrongly initialize the maps. We do |
I guess you mean Here's the order of events:
I think if the maps are initialized |
PR #14721 introduced changes that removed the
cilium_snat_v{4,6}_external maps if NodePort is not enabled.
Issue #15141 was attributed to the above PR, where controllers were
failing with:
In an attempt to address #15141, #15175 added a nodeport argument to
InitMapInfo() so that the cilium_snat_v{4,6}_external maps are not
created if NodePort is not enabled.
PR #15141 did not fix the issue: #15337 (comment)
This PR takes another shot at fixing #15141 by removing a call of
InitMapInfo from init(), where the (new) nodeport argument is always
true.
see the commit message for more details
Fixes: cac5218
Fixes: d639905
Fixes: #15141
Fixes: #15337
Signed-off-by: Kornilios Kourtis kornilios@isovalent.com