A saved board is not the lab: 322 devices reload with different ports (combo cages forgotten, a console port gains a gigabit, declared PoE looks guessed) #1321
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1321
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?
Found by asking the question the last two iterations taught me to ask: where is a guard comparing a subset
when the contract is the whole thing? Here the answer was worse than a weak guard — nothing compared a device
across a save at all.
Topology.fromJSON()rebuilt every port from four keys:and re-derived the rest. Measured over the catalogue: 322 of 2,015 devices come back different from the ones that
were saved.
comboWith,comboRolehardware.maxSpeedMbpshardware.poeOutDeclaredIt is not cosmetic — three behaviours change
A combo cage stops being one cage. Cabling a half while its sibling is in use is refused (
cannot share physical combo cage with Gi0/0/0-sfp, which is already in use). After a reload the sibling isnull, so therefusal stops happening and a second cable goes into an occupied cage:
A console port gains a gigabit and invents a warning.
maxSpeedMbpsfeedsW_SPEED_DOWNGRADE:A reloaded lab can no longer answer whether the engine guessed its PoE.
poeOutDeclaredis exactly thatquestion, and after a reload it answers "guessed" for 1,499 ports that said otherwise in the datasheet.
Why nothing caught it
The saved file was assumed to be the lab. The serializer writes ~23 fields per port, the reader read four, and no
test compared a device before and after — the persistence tests checked that a board came back, not that the
board did.
What must be true instead
(
maxSpeedMbps,poeOutDeclared,maxRangeM,comboWith,comboRole) instead of recomputing a default;invents no warning, and a declared PoE port still says it was declared;
nullline per port forfacts it does not have.
layoutis handed out live, outlives its device, accepts anything (NaN boxes, silently lost arrays), and the API reads 0 as missing #1325