-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parse local address from socket info if remote addr is known (#1833)
Summary: Add condition before `InferConnInfo` to parse the local address from socket information if missing when the remote address is known. Note that this most likely occurs for syscalls (i.e. `connect`) for which we are currently unable to trace the local IP using socket information [from bpf](https://github.com/pixie-io/pixie/blob/561ec31a619e9265cfae319a0aa7ec36e19e29d2/src/stirling/source_connectors/socket_tracer/bcc_bpf/socket_trace.c#L632). Type of change: /kind feature Test Plan: Existing E2E tests. Skaffolded to a cluster with kafka and redis demos deployed and inspected pem logs (added logs to print successfully inferred local IPs when remote IP is present). Ran standalone pem on a node with kafka/redis demos running and inspected logs. Note that I've opted for an E2E test because writing a test case that reliably reproduces the conditions for inference has been tricky. We'd need to ensure that 1. remote address is known while local IP is not 2. short-lived processes/sockets don’t terminate or close before we check `/proc/[pid]/fd/[n]` 3. connections are not bound to the loopback network interface --------- Signed-off-by: Benjamin Kilimnik <[email protected]>
- Loading branch information
1 parent
e633c50
commit f6324ce
Showing
1 changed file
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters