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

Fix tcpretrans gadget #2010

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

mauriciovasquezbernal
Copy link
Member

The checked eBPF object defines the map as "ig_sockets", but it was renamed to gadget_sockets.

$ strings gadgets/trace_tcpretrans_x86.bpf.o | grep ig_sockets
ig_sockets
ig_sockets
	return bpf_map_lookup_elem(&ig_sockets, &key);
ig_sockets

This was causing the event to be missing the process data, like task and container name:

$ go run -exec 'sudo -E' ./cmd/ig/... run --prog @./gadgets/trace_tcpretrans_x86.bpf.o --definition @./gadgets/trace_tcpretrans.yaml
INFO[0000] Experimental features enabled
RUNTIME.CONTAINERNAME                                   SRC                           DST                           TASK             PID     UID      GID
                                                        172.17.0.4:36338              1.1.1.1:443                                    0       0        0
                                                        172.17.0.4:36338              1.1.1.1:443                                    0       0        0

Fix it by forcing make to run again.

Fixes f5be9f7 ("Socket enricher for containerized gadgets")

The checked eBPF object defines the map as "ig_sockets", but it was
renamed to gadget_sockets.

```
$ strings gadgets/trace_tcpretrans_x86.bpf.o | grep ig_sockets
ig_sockets
ig_sockets
	return bpf_map_lookup_elem(&ig_sockets, &key);
ig_sockets
```

This was causing the event to be missing the process data, like task
and container name:

```
$ go run -exec 'sudo -E' ./cmd/ig/... run --prog @./gadgets/trace_tcpretrans_x86.bpf.o --definition @./gadgets/trace_tcpretrans.yaml
INFO[0000] Experimental features enabled
RUNTIME.CONTAINERNAME                                   SRC                           DST                           TASK             PID     UID      GID
                                                        172.17.0.4:36338              1.1.1.1:443                                    0       0        0
                                                        172.17.0.4:36338              1.1.1.1:443                                    0       0        0
```

Fix it by forcing make to run again.

Fixes f5be9f7 ("Socket enricher for containerized gadgets")

Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
Copy link
Member

@alban alban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mauriciovasquezbernal mauriciovasquezbernal merged commit 775719a into main Sep 7, 2023
47 checks passed
@mauriciovasquezbernal mauriciovasquezbernal deleted the mauricio/fix-socket-enricher branch September 7, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants