mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-12-01 09:54:34 +02:00
docs(mcp): node_console_exec — QEMU serial getty login needs one call
Field finding from the smoke test: login flushes typed-ahead input before printing "Password: ", so a password sent in a separate call is lost (Login incorrect loop). Sending username and password in the same command string logs in reliably; the shell then persists across calls.
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -533,7 +533,7 @@ Output handling (the funnel):
|
||||
- `full=true` returns the last 400 lines / 64 KiB.
|
||||
- When output exceeds 50 lines, the full capture is also written to the node's files (`console-capture.txt`, overwritten per session) and the hint includes a `curl` URL with a short-lived **access ticket** (10 min) bound to that exact download path — the same mechanism `link_capture_download` uses. Tickets are short random strings (`gns3t_…`); they replaced long Bearer JWTs in returned URLs because LLM clients reliably corrupted those when retyping them (logging out invalidates outstanding tickets).
|
||||
|
||||
Node-side state persists between calls (config mode, running pings, pager position) — a new session lands where the previous one ended. Control keys are sent as real characters: an interrupt is `"\u0003"` as its own line in the `command` string; the 4-character spelling `"\x03"` is not translated. `command=""` sends a single Enter (wake an idle console / read the prompt). The session stays open the full `timeout` window (default 15 s, max 300 s) — set it just above the expected output time.
|
||||
Node-side state persists between calls (config mode, running pings, pager position) — a new session lands where the previous one ended. On QEMU serial consoles, log in in ONE call: send the username and the password in the same `command` string. `login` flushes typed-ahead input before printing `Password: `, so a password sent in a separate call is lost and the console loops on `Login incorrect`. Once logged in, the shell persists across calls. Control keys are sent as real characters: an interrupt is `"\u0003"` as its own line in the `command` string; the 4-character spelling `"\x03"` is not translated. `command=""` sends a single Enter (wake an idle console / read the prompt). The session stays open the full `timeout` window (default 15 s, max 300 s) — set it just above the expected output time.
|
||||
|
||||
The console WebSocket URL is built from the server's `_server_url()`, which resolves the host as follows:
|
||||
|
||||
|
||||
Reference in new issue
Block a user