Implement KNE Packet Bridge daemon and CLI subcommand - #762
Open
kraney wants to merge 16 commits into
Open
Conversation
The bridge subcommand sets up a daemon process that will forward packets into / out of the KNE cluster over a gRPC streaming service. An external client can use this service to inject or receive packets to/from a particular interface defined in the topology.
This makes bridge usable in KNE-only situations, to link two separate clusters (like if one cluster has access another doesn't.) More importantly, it facilitates easy testing of the feature.
* use a pool for packet buffers * use cancel so waiting goroutines are freed if readLoop exits on a socket error * use signal.NotifyContext() * Make sure kne bridge runs root handlers * distinguish between normal and unexpected stream closure in the client * Better test coverage
kraney
force-pushed
the
feat/packet-bridge
branch
from
September 8, 2026 21:19
b16dcb0 to
e6328da
Compare
kraney
force-pushed
the
feat/packet-bridge
branch
from
September 11, 2026 22:54
b320015 to
4743616
Compare
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
This PR adds Kubernetes TCP socket readiness probes across network device pods based on configured node services, and improves Cisco node lifecycle and status handling.
Key Changes
Dynamic Service Readiness Probes (
topo/node/node.go):- Added
node.ServiceReadinessProbe(pb)which automatically configures a TCP socketReadinessProbeon device containers based on defined node services (prioritizingsshon port 22, thengnmi).- Sorted service keys prior to map iteration to guarantee deterministic probe port selection.
- Updated node implementations across vendors (Arista, Ciena, Cisco, Juniper, Nokia, SONiC) to attach readiness probes to created pods.
Cisco Status and Readiness Checking (
topo/node/cisco/cisco.go):- Updated
Status()to inspectPodStatus.Conditionsforcorev1.PodReady == ConditionTruebefore declaring a podStatusRunning. This prevents XRD (and 8000e) pods from prematurely reporting ready in the 1–2 seconds before control-plane processes boot and listen on ports.- Optimized 8000e log checking during status polling to stream and buffer pod logs once per check cycle rather than making duplicate
API calls for success and failure regex checks.
- Added fatal boot error detection (
Router failed to come up,FATAL sim:,LoginTimeoutError) to reportStatusFailed.- Fixed variable shadowing of the Go built-in
len.Testing:
-
topo/node/cisco/cisco_test.go: Added unit tests forisNode8000eFailedandisNode8000eUp, expandedTestNodeStatuswith Ready/NotReady/Failed conditions and failure log matching, and verifiedReadinessProbegeneration inTestCreate.-
topo/node/juniper/juniper_test.go,topo/node/sonic/sonic_test.go,topo/node/ciena/ciena_test.go: Verifiedcontainer
ReadinessProbeexpectations inTestCreate.-
topo/node/node_test.go: Added test coverage forServiceReadinessProbeservice matching and precedence.