A config change does not move the clock, two fields answer "when did the board change", and show link state prints an instant as a duration #1331
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1331
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?
Time in PacketForge is logical —
runAtMs(the instant a question is asked at),link.stateSinceMs(when a cablechanged) and
topo.lastChangeAtMs(when the board changed, the base of every convergence schedule). Three faults,all measured:
1. A configuration change does not move the clock
topo.markChange()is called from exactly one place:setLinkState(). Shutting a port, enabling it, or moving itbetween VLANs changes what the control plane must do — STP runs its timers again on every port behind it — and none
of them move the clock:
So a ping crosses a port that should be listening, and
_stillConverging()— the honest reason a packet went nowhere— has nothing to say.
2. Two answers to "when did the board change"
Simulator.getConvergence()prefersthis.reconvergeFromMsovertopo.lastChangeAtMs. Nothing in the engine or theserver ever sets
reconvergeFromMs— exceptsetLinkState, which set both. Two fields for one instant is how aschedule gets built from the wrong one, and one of them is dead:
3. An instant wearing a duration's clothes, and an instant out of a dead run
lastChangeAtMsis run bookkeeping, like a MAC table: a run ends, and a reopened board inheriting an instant from adead one builds its schedule from evidence that no longer means anything. The cable's own
stateSinceMsis boardstate — that cable is down, and it went down at 9000 ms — and it must survive (#1323).
What must be true instead
(
Simulator.markTopologyChange()), so the control plane re-converges from now;topo.markChange— with the shadow field gone;state: down, changed at 1200 ms (3800 ms ago), and(not this run)when the instant is later than the run;lastChangeAtMsis not written to the file; a reloaded board derives it from the newest cable fault it carries.link downsays the cable was pulled at t=0, whatever instant the session is standing at #1385