A reopened lab announces nothing, so every cable looks silent #1467
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cause
Neighbour rows are not stored state — they are announced. The board announces when a cable is plugged (
refreshNeighbours(), the call the UI makes afteraddLink), and a load is that same event: every cable in the document is being added right now.Topology.fromJSON()marked nothing, so the simulator built on a reopened lab never announced, and every port claimed its far end had never been heard from with the cables all in place. That is the #1457 symptom — a list that blinded both ends of a cable — arriving by a different road.What should be true
Topology.fromJSON()marks the board it built (loadedFromDocument), and theSimulatorconstructor announces once for such a board: PoE budgets, LLDP to the far end, router advertisements — the same three things plugging a cable does.Two things deliberately not invented: the MAC table is not restored (an entry is learned from a frame, so a reopened board holds exactly the table a live board holds after the same announcement, and a board that announced nothing holds none — the test asserts that equality, not a fixed list), and counters stay a fresh run (they belong to a run, not to a lab; the announcement is counted on the wire as #1457 settled).
Evidence
test/neighbours-on-load.test.js, 20 checks. Revertingengine/fails 7.Neighbours green:
lldp27,show-lldp23,lldp-across-trunk32,flows-survive-save-load16,spec-survives-load32,dhcp-leases-survive-save32,state-payload-complete16,examples-generated21,counters-agreement32,link-state69,stp-port-state31,poe18,config-roundtrip46,pon-splitter33.spanning-tree portfast,vlan 20 name labanddo show vlaneach answered a different question #1493