Skip to content

test(otel/multi_efa): assert per-device EFA pod correlation - #751

Open
samehkhalil wants to merge 1 commit into
aws:mainfrom
samehkhalil:test/multi-efa-per-device-correlation
Open

test(otel/multi_efa): assert per-device EFA pod correlation#751
samehkhalil wants to merge 1 commit into
aws:mainfrom
samehkhalil:test/multi-efa-per-device-correlation

Conversation

@samehkhalil

Copy link
Copy Markdown

Description of the issue

The multi_efa suite validates the EFA receiver surface (device count, unique
ENIs, ports, all metrics per device) and that at least one series is correlated
to a pod, but nothing asserts which device maps to which pod. As a result it
cannot catch the EFA multi-device correlation collapse: when the OTel Container
Insights pipeline promotes per-datapoint pod identity onto the shared node-level
resource without a groupbyattrs/efa split first, every EFA device on the node —
including unclaimed ones — is attributed to a single pod.

The existing assertions all still pass under that collapse:

  • TestMultiEFACorrelatedCount only requires >= 1 correlated series.
  • TestMultiEFACorrelatedPodLabels checks the first efaburn-labeled series.
  • The rest are receiver-level (device/ENI/port), independent of correlation.

Description of changes

Adds TestMultiEFAClaimedVsUnclaimedCorrelation to test/otel/multi_efa/. On the
existing 2-EFA node, efaburn (replicas: 1) claims one device and leaves the
other unclaimed. The test asserts:

  • exactly one EFA device is correlated to a pod (the claimed one), and
  • the remaining device carries no pod attributes,
    and flags a single device attributed to multiple pods.

No fixture/topology change is required — the multi-EFA node already exposes two
devices with efaburn claiming one, which yields the claimed/unclaimed split. Small
sorted-key helpers were added to helpers_test.go for readable failure messages.

License

By submitting this pull request, I confirm that you can use, modify, copy, and
redistribute this contribution, under the terms of your choice.

Tests

gofmt clean; go vet -tags integration ./test/otel/multi_efa/ clean; test
binary compiles (go test -tags integration -c).

Validated on a live 2-EFA c6in.32xlarge node in both directions:

  • Unfixed chart (no groupbyattrs/efa): FAIL — expected 1 correlated (claimed) EFA device(s), got 2: [rdmap0s30 rdmap0s31]; all pre-existing
    multi_efa tests still passed (confirming they don't catch it).
  • With the groupbyattrs/efa fix: PASS — 1 claimed, 1 unclaimed; whole suite green.

Dependency: this test only passes once the groupbyattrs/efa fix is present in
the deployed chart (helm-charts). https://github.com/aws-observability/helm-charts/pull/356/commits It should merge after that chart change reaches
the branch this suite deploys (helm_chart_branch, default main).

Not exercised: a fresh terraform apply of otel-multi-efa was not run; the
test was validated against a hand-provisioned 2-EFA cluster with the chart deployed
both ways.

…vs unclaimed)

Add TestMultiEFAClaimedVsUnclaimedCorrelation to the multi-EFA suite. On the
2-EFA node, efaburn (replicas: 1) claims one device and leaves the other
unclaimed, so the test asserts the claimed device correlates to exactly one pod
and the remaining unclaimed device carries no pod attributes. It also flags a
single device correlated to multiple pods.

This closes a coverage gap: the existing multi_efa tests check device count,
ENIs, ports, and that at least one series is correlated, but none detect the EFA
multi-device correlation collapse — where the resource-level pod promotion
(without a groupbyattrs/efa split) attributes every EFA device on the node,
including unclaimed ones, to a single pod. Verified failing on the current chart
and passing with the groupbyattrs/efa fix.

No topology change is required: the multi-EFA node already exposes two EFA
devices with efaburn claiming one, which yields the claimed/unclaimed split.
@samehkhalil
samehkhalil requested a review from a team as a code owner September 2, 2026 08:51
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.

1 participant