Repository navigation
fix(capture): capture distributed SR-SIM nodes - #159
Merged
Merged
Conversation
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
|
Documentation: Open preview Browser sandbox: Open sandbox Commit: 6f03a62 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #158: capture on
nokia_srsimnodes failed in 0.27 with Edgeshark sayingcould 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 nodedist. Two places got that wrong:dist-a).containerlab capturerejects that:Node "dist-a" is not part of lab "srsimcap"; nodes: dist, integ.Inspect records now carry theclab-root-node-namelabel asrootNodeName, and capture targets use it (recordNodeNameinlab-backend, also used by the extension's node lookup).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 savedcapture.preferredAction: Edgesharkfrom 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 tointeg(SR-1) on1/1/c1/1, SR-SIM 25.10.R2.dist/1/1/c1/1:could not locate network namespace for containerclab-s-…: streamsdist/eth0: same errorclab-srsimcap-dist-a/eth0: streamsclab-srsimcap-dist-aNode "dist-a" is not part of labdist: streamsclab-srsimcap-dist-1Node "dist-1" is not part of labdist: streamsclab-srsimcap-integtsc --noEmit,pnpm lint(incl.knip), unit tests ofclab-ui,lab-backend,standalone-runtimeand the extension pass.test-kit's "reports its runtime, and offers nothing the runtime lacks" fails, also onmain: it expects nocontainerlab captureon the machine.