Skip to content

waypoint failed to process ipv4-mapped ipv6 connections #756

@YaoZengzeng

Description

@YaoZengzeng

What happened:

In default k8s environment (non pure ipv6 env), java applications will use ipv4-mapped ipv6 to create connections by default.

In the absence of waypoint, Kmesh has alreay support this scenario, ref: #291

But it still fails when there is a waypoint.

What you expected to happen:

Kmesh could handle both with and without waypoint.

How to reproduce it (as minimally and precisely as possible):

Deploy bookinfo where reviews service is a java application. When it accesses the ratings service, it would create ipv4-mapped ipv6 connection. Then deploy waypoint for svc ratings, ref: https://kmesh.net/en/docs/userguide/install_waypoint/

Access bookinfo and Kmesh daemon will output the following error log:

time="2024-08-20T08:33:55Z" level=info msg="can't find service correspond workload: ratings-svc-waypoint-5d86d48c55-flxrd" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: origin addr=[10:0a60:4cfe:0000:0000:0000:0000:0000:0000:9080]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: bpf find frontend addr=[10:0a60:4cfe:0000:0000:0000:0000:0000:0000:9080]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[SERVICE] DEBUG: find waypoint addr=[0a60:c461:0000:0000:0000:0000:0000:0000:15008]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: enter cgroup/connect6\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: origin addr=[10:0a60:c461:0000:0000:0000:0000:0000:0000:15008]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: bpf find frontend addr=[10:0a60:c461:0000:0000:0000:0000:0000:0000:15008]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[BACKEND] DEBUG: access the backend by service:2317460390\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[BACKEND] DEBUG: get the backend addr=[0af4:01db:0000:0000:0000:0000:0000:0000:15019]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: enter cgroup/connect6\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: origin addr=[10:0af4:01db:0000:0000:0000:0000:0000:0000:15019]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[KMESH] DEBUG: bpf find frontend addr=[10:0af4:01db:0000:0000:0000:0000:0000:0000:15019]\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[SOCKOPS] ERR: enable encoding metadata failed!, err is -16" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="[SENDMSG] DEBUG: get valid dst, do encoding...\n" subsys=ebpf
time="2024-08-20T08:33:55Z" level=info msg="get destination service host failed" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="can't find service correspond workload: ratings-svc-waypoint-5d86d48c55-flxrd" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="get destination service host failed" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="can't find service correspond workload: reviews-svc-waypoint-6884756fc5-wvdvh" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="get destination service host failed" subsys=pkg/telemetry
time="2024-08-20T08:33:55Z" level=info msg="can't find service correspond workload: reviews-svc-waypoint-6884756fc5-wvdvh" subsys=pkg/telemetry

Anything else we need to know?:

Environment:

  • Kmesh version:
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions