Skip to content

fix(capture): capture distributed SR-SIM nodes - #159

Merged
FloSch62 merged 2 commits into
mainfrom
fix/edgeshark-srsim-capture
Nov 13, 2026
Merged

FloSch62 merged 2 commits into
mainfrom
fix/edgeshark-srsim-capture

Conversation

@FloSch62

Copy link
Copy Markdown
Member

Summary

Fixes #158: capture on nokia_srsim nodes failed in 0.27 with Edgeshark saying could not locate network namespace for container.

A distributed SR-SIM node (e.g. SR-7s) runs as one container per CPM and card (dist-a, dist-1), and none of them is the topology node dist. Two places got that wrong:

  • Capture stream (containerlab 0.83): a capture from the explorer or the canvas named the component container's own node (dist-a). containerlab capture rejects that: Node "dist-a" is not part of lab "srsimcap"; nodes: dist, integ. Inspect records now carry the clab-root-node-name label as rootNodeName, and capture targets use it (recordNodeName in lab-backend, also used by the extension's node lookup).
  • Edgeshark: a canvas capture looked the node up by container name only. When nothing matched, it passed the bare node and the SR OS port (dist + 1/1/c1/1) to Edgeshark, which finds neither. The topology viewer now resolves the node, as named in the topology or with the lab prefix, to the component container that has the port, CPM A first, and to its interface. Link impairments from the canvas use the same lookup.

The reporter runs containerlab 0.83.0, which has containerlab capture. They most likely reached Edgeshark through a saved capture.preferredAction: Edgeshark from before 0.27, where it was the way to open Wireshark locally. With Automatic, the capture stream failed instead, as above.

Testing

Lab with containerlab 0.83.0: dist (SR-7s, CPM A and card 1) linked to integ (SR-1) on 1/1/c1/1, SR-SIM 25.10.R2.

Path Before After
Edgeshark, link end dist / 1/1/c1/1: could not locate network namespace for container host netns / clab-s-…: streams
Edgeshark, port inside the node dist / eth0: same error clab-srsimcap-dist-a / eth0: streams
Capture stream from clab-srsimcap-dist-a Node "dist-a" is not part of lab node dist: streams
Capture stream from clab-srsimcap-dist-1 Node "dist-1" is not part of lab node dist: streams
Capture stream from clab-srsimcap-integ streams streams
  • New unit tests use data recorded from this lab. The 5 new topology viewer tests fail on the old code.
  • tsc --noEmit, pnpm lint (incl. knip), unit tests of clab-ui, lab-backend, standalone-runtime and the extension pass.
  • test-kit's "reports its runtime, and offers nothing the runtime lacks" fails, also on main: it expects no containerlab capture on the machine.
  • Not tested: a full click-through in VS Code, and lab hosts on clab-api-server.

A distributed SR-SIM node, such as an SR-7s, runs as one container per
CPM and card, and none of them is the topology node.

The capture stream named such a container by its own node name (dist-a),
which containerlab rejects as no node of the lab. Inspect records now
carry the clab-root-node-name label, and capture targets use the root
node.

Canvas captures and link impairments looked the node up by container
name only. For these nodes they passed the bare node and the SR OS port
on, which Edgeshark cannot find. They now resolve to the component
container that has the port, and to its interface.

Fixes #158
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Documentation: Open preview

Browser sandbox: Open sandbox

Commit: 6f03a62

@FloSch62
FloSch62 marked this pull request as ready for review November 13, 2026 10:14
@FloSch62
FloSch62 merged commit 78924eb into main Nov 13, 2026
26 checks passed
@FloSch62
FloSch62 deleted the fix/edgeshark-srsim-capture branch November 13, 2026 10:29
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.

Edgeshark integration seems broken on 0.27

1 participant