5554 Commits

Author SHA1 Message Date
arl1984
de0d050689 Fix telnet console silent-proxy hang on non-ConnectionError exit (#2344)
The run() cleanup block was guarded by `except (ConnectionError, OSError):`,
so exits via asyncio.CancelledError or any other exception type skipped
cleanup. Result: `_reader_process` stays pinned to the dead reader and
`_get_reader()` returns None for every subsequent client — the silent-proxy
symptom described in #2344.

Convert the except block to try/finally so cleanup always runs, regardless
of how `_process()` exits. Also:
- catch asyncio.CancelledError + generic Exception (with log.exception) so
  unexpected failures don't swallow the cleanup
- reset `_current_read = None` after cancellation
- use `dict.pop(..., None)` instead of `del` to avoid KeyError races if
  the broadcast loop's timeout handler already removed the entry

Triggering pattern observed in practice: a diagnostic tool opens a console,
sends a few commands, and closes abruptly (e.g. from a test harness or
orchestration script that cancels its Task). If the `_process()` task was
awaiting on one of the `network_read` / `reader_read` futures at the time
of cancellation, the CancelledError propagates up through `run()` and
bypasses the ConnectionError-only except clause. The proxy accepts future
connections (the listen socket is still alive) but never forwards any data
because `_reader_process` never got reset.

Validated against gns3/gns3-server:latest (2.2.56.1) running a 10-scenario
sequential regression batch that previously hung reliably on the 4th
sp_v1 / L3VPN scenario and now completes cleanly across all 10.
2026-04-16 14:46:49 +00:00
Jeremy Grossmann
d59709071a
Merge pull request #2668 from GNS3/release/v2.2.58.1
Release v2.2.58.1
2026-04-12 21:18:23 +08:00
grossmj
ae3ae46151
Development on 2.2.59.dev2 2026-04-12 21:17:17 +08:00
grossmj
58fc6a8478
Release v2.2.58.1 v2.2.58.1 2026-04-12 20:59:20 +08:00
grossmj
d9b8d0d1ff
Sync appliances 2026-04-12 20:49:56 +08:00
grossmj
2b0b31b402
Merge branch 'master' into 2.2 2026-04-12 20:47:14 +08:00
grossmj
4a47151526
Development on 2.2.59.dev1 2026-04-11 18:05:54 +08:00
Jeremy Grossmann
adeec10188
Merge pull request #2667 from GNS3/release/v2.2.58
Release v2.2.58
2026-04-11 17:42:38 +08:00
Jeremy Grossmann
e747deae88
Merge branch 'master' into release/v2.2.58 2026-04-11 17:37:31 +08:00
Jeremy Grossmann
264fffbc6c
Potential fix for pull request finding 'CodeQL / Information exposure through an exception'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-11 17:34:53 +08:00
grossmj
a295d653b8
Release v2.2.58 v2.2.58 2026-04-10 20:36:01 +08:00
grossmj
c6eec799fb
Remove old files 2026-04-10 20:27:46 +08:00
grossmj
8503840307
Bundle web-ui v2.2.58 2026-04-10 20:24:16 +08:00
grossmj
c4dbecc1ea
Sync appliances 2026-04-10 20:11:16 +08:00
Jeremy Grossmann
3d71967983
Merge pull request #2665 from GNS3/refector-snapshots
Snapshot refactoring
2026-04-10 20:01:45 +08:00
grossmj
161e016594
Remove log message 2026-04-10 19:58:55 +08:00
grossmj
82f795c9ee
Add some additional tests 2026-04-10 19:50:42 +08:00
grossmj
2670c68467
Last adjustments for import/export 2026-04-10 18:58:21 +08:00
grossmj
6f7730c455
Update snapshots when duplicating a project 2026-04-09 23:18:55 +08:00
grossmj
274cef6cf5
Add description for snapshots 2026-04-09 20:25:44 +08:00
grossmj
fbea9b655d
Fix issue when restoring a snapshot of a duplicated project 2026-04-08 22:16:47 +08:00
grossmj
6869f2d71d
Snapshot refactoring 2026-04-08 20:02:01 +08:00
Jeremy Grossmann
e871a1aed6
Merge pull request #2661 from GNS3/revert-2660-backport-telnetlib3
Revert "Backport telnetlib3 changes"
2026-04-05 22:02:05 +08:00
Jeremy Grossmann
b222fba42c
Revert "Backport telnetlib3 changes" 2026-04-05 21:58:21 +08:00
Jeremy Grossmann
f9957b1d90
Merge pull request #2660 from GNS3/backport-telnetlib3
Backport telnetlib3 changes
2026-04-05 21:08:43 +08:00
grossmj
bc6374f7fc
Add keepalive mechanism using the NOP command 2026-04-05 13:30:38 +08:00
Cristi
c739a16d70
Improved exception handling and telnet client disconnect 2026-04-05 13:29:35 +08:00
Cristi
7684ce60ce
Backport: Re-write current Telnet server implementation using telnetlib3 library 2026-04-05 13:29:25 +08:00
Jeremy Grossmann
4701712a86
Merge pull request #2644 from GNS3/release/v2.2.57
Release v2.2.57
2026-03-24 10:10:22 +08:00
grossmj
e5ff9e7f00
Development on 2.2.58.dev1 2026-03-24 08:35:49 +08:00
grossmj
7adb0c5226
Release v2.2.57 v2.2.57 2026-03-23 09:45:46 +08:00
grossmj
667833dda5
Merge remote-tracking branch 'origin/master' into 2.2 2026-03-23 09:38:13 +08:00
grossmj
646ff00ade
Sync appliances 2026-03-23 09:37:15 +08:00
YueGuobin
ffcfa4ccb1
feat(telnet_server): improve error handling and connection management
- Catch OSError alongside ConnectionError in connection processing to handle more network errors
- Move client_info retrieval inside try block to prevent AttributeError on failed connections
- Replace bare except with specific exceptions (OSError, ConnectionError, asyncio.TimeoutError)
- Improve error logging to include specific exception details and client information
2026-03-15 23:07:06 +08:00
Jeremy Grossmann
5c63928636
Merge pull request #2634 from GNS3/update-iol-ram-nvram
Deactivate 'use default IOU values' by default and update RAM/NVRAM values
2026-03-12 13:53:04 +08:00
grossmj
0624c1b945
Deactivate 'use default IOU values' by default and update RAM/NVRAM values 2026-03-10 20:28:00 +08:00
grossmj
b658f7ff68
Make sure the node shows as stopped when the wrap console cannot be stopped. Ref https://github.com/GNS3/gns3-registry/pull/1010 2026-03-09 17:10:00 +08:00
Jeremy Grossmann
cd51afb01f
Merge pull request #2633 from GNS3/revert-2628-console
Revert "Fix QEMU serial console artifacts by filtering ANSI CPR responses in …"
2026-03-07 22:24:17 +08:00
Jeremy Grossmann
14ffa2c2d6
Revert "Fix QEMU serial console artifacts by filtering ANSI CPR responses in …" 2026-03-07 22:22:16 +08:00
Jeremy Grossmann
09aaf43dd1
Merge pull request #2628 from Raizo62/console
Fix QEMU serial console artifacts by filtering ANSI CPR responses in …
2026-03-06 18:24:34 +08:00
Raizo62
590eedeb46 Fix QEMU serial console artifacts by filtering ANSI CPR responses in telnet proxy
- filter incoming cursor position report sequences (`ESC[<row>;<col>R`) in `AsyncioTelnetServer`
- prevent stray `;1R;80R` characters on late telnet console attach after VM boot
- keep QEMU serial transport unchanged (`-serial telnet`) for BIOS compatibility
2026-03-04 14:26:52 +01:00
Jeremy Grossmann
d3710e8e9a
Merge pull request #2621 from markparonyan/issue-2521
handle None port name to prevent TypeError in short_name method
2026-03-01 12:31:17 +08:00
Mark Paronyan
0da1a6639a
tests(controller,port): short_name finishes successfully when port name is None 2026-02-28 21:45:08 +03:00
Mark Paronyan
729eb43115
fix(controller,port): handle None port name to prevent TypeError in short_name method 2026-02-28 21:45:00 +03:00
grossmj
4d85e517b4
Development on 2.2.57.dev2 2026-02-24 21:21:03 +08:00
Jeremy Grossmann
3b95859b79
Merge pull request #2612 from dalearbo/fix/busybox-musl-ldd-check
fix: busybox static link detection on Alpine/musl
2026-02-20 16:01:01 +08:00
grossmj
47cc827c1f
Remove some files not related to PR 2026-02-20 15:56:08 +08:00
grossmj
715b7032bc
Fix tests 2026-02-20 15:51:49 +08:00
Jeremy Grossmann
bc1729b255
Merge branch '2.2' into fix/busybox-musl-ldd-check 2026-02-20 15:24:54 +08:00
Dale Arbogast
3dd4184193 fix: busybox static link detection on Alpine/musl
On musl-based systems (Alpine), ldd returns exit code 0 for static
binaries, unlike glibc which returns 1. This causes install_busybox()
to reject all busybox binaries as "dynamically linked" on Alpine.

Fix by also accepting binaries whose executable name contains "static"
(i.e. busybox-static, busybox.static), which are the first two
candidates checked by the function. The generic "busybox" fallback
still relies on the ldd return code check.
2026-02-19 16:44:01 -05:00