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

lbmap:Port information display error #13243

Closed
Jianlin-lv opened this issue Sep 22, 2020 · 0 comments · Fixed by #13244
Closed

lbmap:Port information display error #13243

Jianlin-lv opened this issue Sep 22, 2020 · 0 comments · Fixed by #13244
Assignees
Labels
kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.

Comments

@Jianlin-lv
Copy link
Contributor

The endianness of my test environment is little endian;
The port information displayed by given maps(cilium_lb4_services_v2/cilium_lb4_backends/cilium_lb4_reverse_nat) is incorrect;
The port info is stored in network byte order;

root@jianlin:/home/jianlin/code/cilium-install# lscpu |grep Endian
Byte Order:                      Little Endian
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- cilium map get cilium_lb4_services_v2
Key                    Value                    State   Error
172.16.1.236:20480     0 (1024) [FLAGS: 0x40]   sync
10.169.208.214:21630   0 (1280) [FLAGS: 0x42]   sync
0.0.0.0:21630          0 (1536) [FLAGS: 0x2]    sync
172.16.1.1:47873       0 (256) [FLAGS: 0x40]    sync
172.16.1.10:49443      0 (768) [FLAGS: 0x40]    sync
172.16.1.10:13568      0 (512) [FLAGS: 0x40]    sync
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- cilium map get cilium_lb4_backends
Key   Value                    State   Error
6     ANY://10.0.0.89:20480    sync
7     ANY://10.0.1.230:20480   sync
8     ANY://10.0.1.219:20480   sync
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- cilium map get cilium_lb4_reverse_nat
Key    Value                  State   Error
1280   10.169.208.214:21630   sync
1536   0.0.0.0:21630          sync
256    172.16.1.1:47873       sync
768    172.16.1.10:49443      sync
512    172.16.1.10:13568      sync
1024   172.16.1.236:20480     sync
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- cilium service list
ID   Frontend               Service Type   Backend
1    172.16.1.1:443         ClusterIP      1 => 10.169.208.214:6443
2    172.16.1.10:53         ClusterIP      1 => 10.0.0.85:53
                                           2 => 10.0.0.100:53
3    172.16.1.10:9153       ClusterIP      1 => 10.0.0.85:9153
                                           2 => 10.0.0.100:9153
4    172.16.1.236:80        ClusterIP      1 => 10.0.0.89:80
                                           2 => 10.0.1.230:80
                                           3 => 10.0.1.219:80
5    10.169.208.214:32340   NodePort       1 => 10.0.0.89:80
                                           2 => 10.0.1.230:80
                                           3 => 10.0.1.219:80
6    0.0.0.0:32340          NodePort       1 => 10.0.0.89:80
                                           2 => 10.0.1.230:80
                                           3 => 10.0.1.219:80

*************************************************

root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- bpftool map dump pinned /sys/fs/bpf/tc/globals/cilium_lb4_services_v2
key: 00 00 00 00 7e 54 01 00  00 00 00 00  value: 06 00 00 00 00 00 00 06  00 00 00 00
key: 00 00 00 00 7e 54 00 00  00 00 00 00  value: 00 00 00 00 03 00 00 06  02 00 00 00
key: 00 00 00 00 7e 54 03 00  00 00 00 00  value: 08 00 00 00 00 00 00 06  00 00 00 00
key: 0a a9 d0 d6 7e 54 01 00  00 00 00 00  value: 07 00 00 00 00 00 00 05  00 00 00 00
key: 00 00 00 00 7e 54 02 00  00 00 00 00  value: 07 00 00 00 00 00 00 06  00 00 00 00
key: ac 10 01 0a 00 35 00 00  00 00 00 00  value: 00 00 00 00 02 00 00 02  40 00 00 00
key: 0a a9 d0 d6 7e 54 00 00  00 00 00 00  value: 00 00 00 00 03 00 00 05  42 00 00 00
key: ac 10 01 0a 23 c1 00 00  00 00 00 00  value: 00 00 00 00 02 00 00 03  40 00 00 00
key: ac 10 01 ec 00 50 02 00  00 00 00 00  value: 07 00 00 00 00 00 00 04  00 00 00 00
key: ac 10 01 0a 23 c1 02 00  00 00 00 00  value: 05 00 00 00 00 00 00 03  00 00 00 00
key: ac 10 01 01 01 bb 00 00  00 00 00 00  value: 00 00 00 00 01 00 00 01  40 00 00 00
key: 0a a9 d0 d6 7e 54 03 00  00 00 00 00  value: 06 00 00 00 00 00 00 05  00 00 00 00
key: ac 10 01 0a 00 35 01 00  00 00 00 00  value: 02 00 00 00 00 00 00 02  00 00 00 00
key: 0a a9 d0 d6 7e 54 02 00  00 00 00 00  value: 08 00 00 00 00 00 00 05  00 00 00 00
key: ac 10 01 0a 23 c1 01 00  00 00 00 00  value: 03 00 00 00 00 00 00 03  00 00 00 00
key: ac 10 01 0a 00 35 02 00  00 00 00 00  value: 04 00 00 00 00 00 00 02  00 00 00 00
key: ac 10 01 ec 00 50 00 00  00 00 00 00  value: 00 00 00 00 03 00 00 04  40 00 00 00
key: ac 10 01 01 01 bb 01 00  00 00 00 00  value: 01 00 00 00 00 00 00 01  00 00 00 00
key: ac 10 01 ec 00 50 03 00  00 00 00 00  value: 08 00 00 00 00 00 00 04  00 00 00 00
key: ac 10 01 ec 00 50 01 00  00 00 00 00  value: 06 00 00 00 00 00 00 04  00 00 00 00
Found 20 elements
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- bpftool map dump pinned /sys/fs/bpf/tc/globals/cilium_lb4_backends
key: 02 00  value: 0a 00 00 55 00 35 00 00
key: 01 00  value: 0a a9 d0 d6 19 2b 00 00
key: 04 00  value: 0a 00 00 64 00 35 00 00
key: 08 00  value: 0a 00 01 db 00 50 00 00
key: 03 00  value: 0a 00 00 55 23 c1 00 00
key: 05 00  value: 0a 00 00 64 23 c1 00 00
key: 07 00  value: 0a 00 01 e6 00 50 00 00
key: 06 00  value: 0a 00 00 59 00 50 00 00
Found 8 elements
root@jianlin:/home/jianlin/code/cilium-install# kubectl exec -it -n kube-system cilium-5dmnz -- bpftool map dump pinned /sys/fs/bpf/tc/globals/cilium_lb4_reverse_nat
key: 00 05  value: 0a a9 d0 d6 7e 54
key: 00 01  value: ac 10 01 01 01 bb
key: 00 06  value: 00 00 00 00 7e 54
key: 00 04  value: ac 10 01 ec 00 50
key: 00 02  value: ac 10 01 0a 00 35
key: 00 03  value: ac 10 01 0a 23 c1
Found 6 elements

@Jianlin-lv Jianlin-lv added the kind/bug This is a bug in the Cilium logic. label Sep 22, 2020
@borkmann borkmann added this to TODO (untriaged & unsorted) in 1.9 kube-proxy removal & general dp optimization Sep 25, 2020
@kaworu kaworu added the kind/community-report This was reported by a user in the Cilium community, eg via Slack. label Oct 6, 2020
@borkmann borkmann removed this from TODO (untriaged & unsorted) in 1.9 kube-proxy removal & general dp optimization Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. kind/community-report This was reported by a user in the Cilium community, eg via Slack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants