kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
464 stars 70 forks source link

correctly store origin dst addr in map_of_dst_info at ipv4-mapped ipv… #765

Closed kwb0523 closed 2 months ago

kwb0523 commented 2 months ago

…6 scene

What type of PR is this? /kind bug

What this PR does / why we need it: In waypoint_manager func, the ipv6 addr in kmesh_ctx->orig_dst_addr.ip6 is reversed to ipv4 format, and this format of ipv6 address inapplicable for later waypoint processing, it need store the origin dst addr directly.

Which issue(s) this PR fixes: Fixes #756

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

kwb0523 commented 2 months ago

/retest

YaoZengzeng commented 2 months ago

Kmesh daemon will fail to restart:

root@kurator-linux-0002:~/kmesh# kklp kmesh-8ktvh 
none on /sys/fs/bpf type bpf (rw,relatime)
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --bpf-fs-path=\"/sys/fs/bpf\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --cgroup2-path=\"/mnt/kmesh_cgroup2\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --cni-etc-path=\"/etc/cni/net.d\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --conflist-name=\"\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-bpf-log=\"true\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-bypass=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-mda=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --enable-secret-manager=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --help=\"false\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --mode=\"workload\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="FLAG: --plugin-cni-chained=\"true\"" subsys=manager
time="2024-08-23T07:22:17Z" level=info msg="oldGitVersion: 2800172400 newGitVersion: 2800172400" subsys=pkg/bpf
time="2024-08-23T07:22:17Z" level=info msg="kmesh start with Restart, load bpf maps and prog from last" subsys=pkg/bpf
time="2024-08-23T07:22:17Z" level=info msg="kmesh restart, not clean bpf map and prog" subsys=pkg/bpf
Error: bpf Load failed, field CgroupConnect4Prog: program cgroup_connect4_prog: load program: permission denied: 404: (7b) *(u64 *)(r10 -56) = r1: 405: (79) r6 = * (truncated, 278 line(s) omitted)
time="2024-08-23T07:22:17Z" level=error msg="bpf Load failed, field CgroupConnect4Prog: program cgroup_connect4_prog: load program: permission denied: 404: (7b) *(u64 *)(r10 -56) = r1: 405: (79) r6 = * (truncated, 278 line(s) omitted)" subsys=main
kmesh exit
lec-bit commented 2 months ago

/retest

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 52.09%. Comparing base (24ba1d1) to head (a941af1). Report is 46 commits behind head on main.

see 7 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a09130b...a941af1. Read the comment docs.

YaoZengzeng commented 2 months ago

Should add an e2e test with bookinfo example and add namespace waypoint for each service

ref: #766

YaoZengzeng commented 2 months ago

/lgtm

hzxuzhonghu commented 2 months ago

/cherry-pick release-0.4

/approve

kmesh-bot commented 2 months ago

@hzxuzhonghu: once the present PR merges, I will cherry-pick it on top of release-0.4 in a new PR and assign it to you.

In response to [this](https://github.com/kmesh-net/kmesh/pull/765#issuecomment-2314563739): >/cherry-pick release-0.4 > >/approve Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
kmesh-bot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kmesh-net/kmesh/blob/main/OWNERS)~~ [hzxuzhonghu] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
kmesh-bot commented 2 months ago

@hzxuzhonghu: new pull request created: #785

In response to [this](https://github.com/kmesh-net/kmesh/pull/765#issuecomment-2314563739): >/cherry-pick release-0.4 > >/approve Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.