Skip to content
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

daemon: Fix session affinity map creation #12134

Merged
merged 3 commits into from Jun 18, 2020
Merged

Conversation

brb
Copy link
Member

@brb brb commented Jun 17, 2020

This PR fixes the BPF session affinity -related maps creation, improves logging of auto detection and moves the replacement helpers into cmd/kube_proxy_replacement.go.

Reviewable per commit.

Fixes: bcdcf9b ("daemon: Move kubeProxyReplacement init after connect to k8s")
Reported-by: Jarno Rajahalme jarno@covalent.io

Fix #12118.

@brb brb added pending-review area/daemon Impacts operation of the Cilium daemon. release-note/bug This PR fixes an issue in a previous release of Cilium. labels Jun 17, 2020
@brb brb requested a review from a team June 17, 2020 10:26
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.8.0 Jun 17, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.8.0 Jun 17, 2020
@brb
Copy link
Member Author

brb commented Jun 17, 2020

test-me-please

@coveralls
Copy link

coveralls commented Jun 17, 2020

Coverage Status

Coverage decreased (-0.02%) to 37.109% when pulling 34c4247 on pr/brb/fix-kube-proxy-init into 0ee0458 on master.

@brb
Copy link
Member Author

brb commented Jun 17, 2020

retest-4.19

Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit. Is the CI failure a flake or potentially caused by this PR?

daemon/cmd/daemon_main.go Outdated Show resolved Hide resolved
@joestringer
Copy link
Member

@borkmann
Copy link
Member

K8sDatapathConfig Etcd Check connectivity failure:

https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Kernel/2162/testReport/junit/Suite-k8s-1/17/K8sDatapathConfig_Etcd_Check_connectivity/

Known CI flake on 4.19; I think not tracked yet though.

@joestringer
Copy link
Member

retest-4.19

@brb
Copy link
Member Author

brb commented Jun 18, 2020

4.19 hit the same Etcd flake.

@brb
Copy link
Member Author

brb commented Jun 18, 2020

test-me-please

@brb brb force-pushed the pr/brb/fix-kube-proxy-init branch from e0111ae to 34c4247 Compare June 18, 2020 08:06
@brb
Copy link
Member Author

brb commented Jun 18, 2020

Hit Suite-k8s-1.11.K8sPolicyTest Multi-node policy test validates fromEntities policies with remote-node identity enabled Validates fromEntities remote-node policy (https://jenkins.cilium.io/job/Cilium-PR-K8s-oldest-net-next/869/testReport/junit/Suite-k8s-1/11/K8sPolicyTest_Multi_node_policy_test_validates_fromEntities_policies_with_remote_node_identity_enabled_Validates_fromEntities_remote_node_policy/)

@brb
Copy link
Member Author

brb commented Jun 18, 2020

retest-net-next

@brb brb force-pushed the pr/brb/fix-kube-proxy-init branch from 34c4247 to 4561293 Compare June 18, 2020 13:26
@brb
Copy link
Member Author

brb commented Jun 18, 2020

test-me-please

brb added 3 commits June 18, 2020 15:27
- Add session affinity to auto-{enable,disable} msgs.
- Make more clear that auto-enabling does not guarantee that the listed
  features will be enabled.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
And move all related helpers from cmd/daemon_main.go into
cmd/kube_proxy_replacement.go to not bloat over the former.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
Previously, initKubeProxyReplacementOptions() was called after
initMaps() which when running with --kube-proxy-replacement=probe and
--enable-session-affinity=false resulted in the session affinity -related
BPF maps not being created.

An example error log message which illustrated that:

    level=warning msg="Unable to add entry to
    affinity match map" backendID=5 error="Unable to get object
    /sys/fs/bpf/tc/globals/cilium_lb_affinity_match: no such file or
    directory" serviceID=11 subsys=service

Fixes: bcdcf9b ("daemon: Move kubeProxyReplacement init after connect to k8s")
Reported-by: Jarno Rajahalme <jarno@covalent.io>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
@borkmann borkmann merged commit e601e8f into master Jun 18, 2020
1.8.0 automation moved this from In progress to Merged Jun 18, 2020
@borkmann borkmann deleted the pr/brb/fix-kube-proxy-init branch June 18, 2020 15:50
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.0 Jun 18, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Backport done to v1.8 in 1.8.0 Jun 18, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Backport done to v1.8 in 1.8.0 Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/daemon Impacts operation of the Cilium daemon. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.8.0
  
Merged
1.8.0
Backport done to v1.8
Development

Successfully merging this pull request may close these issues.

CI: controller bpf-map-sync-cilium_lb_affinity_match is failing
6 participants