The console over HTTP is the same console (#1336) #1337
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1337
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/console-over-http"
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?
The console over HTTP is the same console.
Fixes #1336.
POST /api/topologies/:id/config/:devIdran the console onnew Simulator(topo)— a second accounting, with its ownflow state — and took no instant at all. Three consequences, all measured over HTTP.
1. One board, two sets of counters.
2. Every console answer was given at
Infinity. The cable endpoint takesatMsand reports a schedule, so the APIcould report a lab mid-convergence and could not ask the console about it.
3.
show spanning-treeprinteddev.stp, which is written by whichever simulator computed it last. After a cablewas cut at 20000, a console asked at 25000 printed
1/1/1 designated forwarding— the port was still listening.Fixes
simForFlows(topo), so the console and the payload share one accounting;:configtakesatMs, applying it to the session's simulator on every request (not only when supplied, so acached session cannot pin a later caller to an instant it did not ask for), and answers with
runAtMs(nullwhenthe question was "once everything has settled") and
convergence;show spanning-treerecomputes the tree at the attached simulator's instant before reading it.Evidence
test/console-over-http.test.js— 12 checks. The counters the console prints are the counters the payloadpublishes, in both directions (equal, not similar); an answer with no instant says so and carries a convergence
schedule like every other mutation; asked at 25000 it says so; after a cable cut at 20000,
show spanning-treeat25000 says the port is still coming up, and with no instant says it forwards, with the answer reporting when the board
last changed; and two requests in the same cached session with different instants answer differently.
With
server/index.jsandengine/cli.jsreverted, 6 of the 12 fail: "0 packets input, 0 bytes" against apayload of 4 packets and 114 bytes, no
runAtMsorconvergencein the answer, and a port still listening reportedas forwarding.
Suite run twice on this branch: 183 suites, 7,115 assertions, 0 failed both times (253.5 s, 252.7 s).
docs/ARCHITECTURE.md: "The console over HTTP".POST /api/topologies/:id/config/:devId ran the console on `new Simulator(topo)` - a second accounting, with its own flow state - and it took no instant at all. Three consequences, all measured over HTTP. 1. One board, two sets of counters. A flow opened through /flows counted 4 packets and 114 bytes into the topology's flow state; the console, asked `show interfaces eth0`, printed "0 packets input, 0 bytes" - and traffic the console generated was invisible to the payload in the same way. 2. Every console answer was given at Infinity. The cable endpoint takes `atMs` and reports a convergence schedule, so the API could say "this lab is mid-convergence" and simultaneously could not ask the console about it. 3. `show spanning-tree` printed `dev.stp`, which is written by whichever Simulator computed it last. A console asked at instant 25000 - after a cable was cut at 20000 - printed the tree from an earlier pass at Infinity and called a port that was still listening "forwarding". Fixes: * the session is built on simForFlows(topo), so the console and the payload share one accounting; * /config takes `atMs`, applying it to the session's simulator on every request (not only when supplied, so a cached session cannot pin a later caller to an instant it did not ask for), and answers with `runAtMs` (null when the question was "once everything has settled") and `convergence`; * show spanning-tree recomputes the tree at the attached simulator's instant before reading it. test/console-over-http.test.js: 12 checks. The counters the console prints are the counters the payload publishes, in both directions (not similar - equal); an answer with no instant says so and carries a convergence schedule like every other mutation; asked at 25000 it says so; after a cable cut at 20000, show spanning-tree at 25000 says the port is still coming up and with no instant says it forwards, and the answer reports when the board last changed; and two requests in the same cached session with different instants answer differently. With server/index.js and engine/cli.js reverted, 6 of the 12 fail: "0 packets input, 0 bytes" against a payload of 4 packets and 114 bytes, no runAtMs or convergence in the answer, and a port still listening reported as forwarding. docs/ARCHITECTURE.md: "The console over HTTP". Suite: 183 suites, 7,115 assertions, 0 failed.