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

Fields of type gadget_l3endpoint_t not displayed correctly in both columns and json outputs #2813

Open
alban opened this issue May 7, 2024 · 0 comments

Comments

@alban
Copy link
Member

alban commented May 7, 2024

Description

I am writing a gadget using struct gadget_l3endpoint_t (see #2795 and I have some problem where the endpoints columns are not displayed correctly:

  1. The column ENDPOINT.STRING looks good but the column ENDPOINT.ADDR.V6 looks mangled.
$ sudo IG_EXPERIMENTAL=true ig run albantest.azurecr.io/trace_udns:t1 --verify-image=false --host
INFO[0000] Experimental features enabled                
WARN[0000] you set --verify-image=false, image will not be verified 
WARN[0002] you set --verify-image=false, image will not be verified 
RUNTIME.CONTAINERNAME                    MNTNS_ID         PID                   TID            COMM             NAME                  SERVICE               ENDPOINT.ADDR.V6      ENDPOINT.ADDR… EN… OPERATION_STR        ENDPOINT.STRING     
                                         4026531841       3326691               3326692        curl             www.wikipedia.org     80                    �;�                  3761967033     4   getaddrinfo          185.15.59.224
  1. The json output does not show the endpoint at all:
$ sudo IG_EXPERIMENTAL=true ig run albantest.azurecr.io/trace_udns:t1 --verify-image=false --host -o json
INFO[0000] Experimental features enabled                
WARN[0000] you set --verify-image=false, image will not be verified 
WARN[0002] you set --verify-image=false, image will not be verified 
{"comm":"curl","k8s":{"container":"","hostnetwork":false,"namespace":"","node":"","pod":""},"mntns_id":4026531841,"name":"www.wikipedia.org","operation":0,"operation_str":"getaddrinfo","pid":3337126,"runtime":{"containerId":"","containerImageDigest":"","containerImageName":"","containerName":"","runtimeName":""},"service":"80","tid":3337127}

Impact

Gadget authors cannot use gadget_l3endpoint_t in their gadgets.

Environment and steps to reproduce

See above.

Expected behavior

  • When an IP is IPv4, the column ENDPOINT.ADDR.V6 should not display anything.
  • The json output should include the endpoints.

Additional information

cc @flyth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants