Revision 0d32552951451b33e896c333e079a83e07c8b258 authored by André Martins on 26 January 2019, 14:01:37 UTC, committed by Ian Vernon on 29 January 2019, 16:49:19 UTC
[ upstream commit 853fec659702b724295b83e0df8b282c033933f6 ] As lbmap.DumpServiceMapsToUserspace returns a list of backend services, this list of backend services can contain duplicated entries as BPF lb map can contain multiple entries for the same service as showned from the following log messages: ``` level=debug msg="parsing service mapping" bpfMapKey="10.98.234.114:9125" bpfMapValue="0.0.0.0:0 (0)" subsys=map-lb level=debug msg="converting ServiceKey and ServiceValue to frontend and backend" obj="0.0.0.0:0 (0)" serviceID="10.98.234.114:9125" subsys=map-lb level=debug msg="creating L3n4Addr for ServiceKey" serviceID="10.98.234.114:9125" subsys=map-lb level=debug msg="adding frontend and backend to SVCMap" backend="0.0.0.0:0, weight: 0" backendIndex=0 frontend="10.98.234.114:9125" subsys=loadbalancer level=debug msg="parsing service mapping" bpfMapKey="10.98.234.114:9125" bpfMapValue="10.10.1.222:9125 (29)" subsys=map-lb level=debug msg="converting ServiceKey and ServiceValue to frontend and backend" obj="10.10.1.222:9125 (29)" serviceID="10.98.234.114:9125" subsys=map-lb ``` In order to correctly remove this list of services that are no longer being managed by k8s one should use a Set to avoid trying to delete multiple times the same LB service which results in controller errors such as: ``` msg="Controller run failed" consecutiveErrors=2 error="Errors deleting BPF map entries: key 10.98.234.114:42275 is not in lbmap... ``` Fixes: cc4be8e37107 ("daemon: sync BPF maps with in-memory K8s service maps") Signed-off-by: André Martins <andre@cilium.io> Signed-off-by: Joe Stringer <joe@cilium.io>
1 parent 1576284
File | Mode | Size |
---|---|---|
.github | ||
.travis | ||
Documentation | ||
api | ||
bpf | ||
bugtool | ||
cilium | ||
cilium-health | ||
common | ||
contrib | ||
daemon | ||
envoy | ||
examples | ||
hack | ||
monitor | ||
operator | ||
pkg | ||
plugins | ||
proxylib | ||
test | ||
tests | ||
tools | ||
vendor | ||
.authors.aux | -rw-r--r-- | 416 bytes |
.gitignore | -rw-r--r-- | 857 bytes |
.gitmodules | -rw-r--r-- | 0 bytes |
.mailmap | -rw-r--r-- | 737 bytes |
.travis.yml | -rw-r--r-- | 424 bytes |
AUTHORS | -rw-r--r-- | 5.6 KB |
CODEOWNERS | -rw-r--r-- | 1.1 KB |
CONTRIBUTING.md | -rw-r--r-- | 193 bytes |
Dockerfile | -rw-r--r-- | 1.9 KB |
Dockerfile.builder | -rw-r--r-- | 1.1 KB |
Gopkg.lock | -rw-r--r-- | 33.4 KB |
Gopkg.toml | -rw-r--r-- | 12.5 KB |
Jenkinsfile.nightly | -rw-r--r-- | 4.7 KB |
LICENSE | -rw-r--r-- | 11.1 KB |
Makefile | -rw-r--r-- | 11.5 KB |
Makefile.defs | -rw-r--r-- | 1.3 KB |
Makefile.quiet | -rw-r--r-- | 456 bytes |
NEWS.rst | -rw-r--r-- | 20 bytes |
README.rst | -rw-r--r-- | 14.7 KB |
VERSION | -rw-r--r-- | 10 bytes |
Vagrantfile | -rw-r--r-- | 11.9 KB |
cilium-docker-plugin.Dockerfile | -rw-r--r-- | 511 bytes |
cilium-operator.Dockerfile | -rw-r--r-- | 507 bytes |
docs.Jenkinsfile | -rw-r--r-- | 2.6 KB |
flannel.Jenkinsfile | -rw-r--r-- | 3.2 KB |
ginkgo-kubernetes-all.Jenkinsfile | -rw-r--r-- | 6.5 KB |
ginkgo.Jenkinsfile | -rw-r--r-- | 4.2 KB |
kubernetes-upstream.Jenkinsfile | -rw-r--r-- | 4.2 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...