6370 Commits

Author SHA1 Message Date
grossmj
cb18b60c5d
Ignore HTTPException received when closing a project 2026-03-17 13:23:19 +08:00
Jeremy Grossmann
0d1341b4e0
Merge pull request #2640 from UmmmAGoodName/Dymamips_fix-3.0
Fixed issue #1605 regarding Cisco slots causing configs to break
2026-03-17 12:54:45 +08:00
grossmj
4f863f3767
Fix typo 2026-03-17 12:51:36 +08:00
grossmj
0aa6566e50
Prevent router to be duplicated when running and add tests 2026-03-17 12:49:38 +08:00
UmmmAGoodName
95bd76a212 Fixed issue #1605 regarding Cisco slots causing configs to break 2026-03-16 19:09:32 +01:00
Jeremy Grossmann
6ac4c27bc1
Merge pull request #2639 from yueguobin/fix/telnet-server-connection-race-condition-3.0
Fix/telnet server connection race condition 3.0
2026-03-15 23:01:57 +08:00
Jeremy Grossmann
632b3daab7
Merge pull request #2635 from yueguobin/fix/iou-suspend-405
fix(iou): return 405 error for unsupported suspend operation
2026-03-15 22:47:42 +08:00
grossmj
6e7738a14f
Return 405 error for unsupported actions for other node types 2026-03-15 22:38:51 +08:00
Guobin Yue
08b579ff83
Merge branch '3.0' into fix/telnet-server-connection-race-condition-3.0 2026-03-15 01:17:30 +08:00
YueGuobin
1aced27dc1 feat(docs): add telnet server connection race condition bug report
Add detailed bug report documenting a race condition in the telnet server's broadcast logic. The bug occurs when a client disconnects while the server is iterating through connections to broadcast data, causing an uncaught OSError from getpeername() call.

Key details included:
- Error logs showing OSError: [Errno 107] Transport endpoint is not connected
- Architecture diagram illustrating the telnet proxy server setup
- Root cause analysis showing the race condition timeline
- Problematic code location in telnet_server.py line 305
- Exception hierarchy explanation showing why OSError isn't caught
- Impact assessment and proposed solutions

This documentation will help track and resolve the issue where client disconnections during broadcast cause unhandled exceptions.
2026-03-15 00:19:51 +08:00
YueGuobin
cda5fdd94b 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 00:19:51 +08:00
YueGuobin
e4faf673af fix(telnet): handle connection race condition during broadcast
Fixes two critical issues in telnet server when clients rapidly
   connect/disconnect during broadcast operations:

   1. **OSError [Errno 107]**: Transport endpoint not connected
      - Root cause: getpeername() called outside try block
      - Fix: Move getpeername() inside try block and catch OSError
      - Expand exception handling to include OSError and TimeoutError

   2. **KeyError**: Double deletion from connections dictionary
      - Root cause: Connection deleted in broadcast loop, then deleted
        again in top-level exception handler
      - Fix: Use dict.pop(key, None) instead of del dict[key]

   **Changes**:
   - Line 216: Add OSError to top-level exception handler
   - Line 227-228: Use pop() to avoid KeyError on double deletion
   - Line 305-316: Move getpeername() inside try block, expand
     exception types, use pop() for safe deletion

   **Impact**:
   - Prevents unhandled exceptions from propagating to asyncio event loop
   - Ensures proper resource cleanup even with race conditions
   - No resource leaks or zombie connections
   - Long-lived clients unaffected by rapid client disconnects

   **Test Script**:
   - Added stress test script to reproduce the issue
   - Supports IOU-L3, VPCS, and generic device types
   - Rapid clients send broadcast-triggering commands (show/run/OSPF)

   **Related**: Fixes bug documented in docs/bugs/telnet-server-connection-race-condition.md
2026-03-15 00:19:51 +08:00
Jeremy Grossmann
ad784fbf6f
Merge pull request #2637 from UmmmAGoodName/3.0
Minor improvements
2026-03-14 19:10:51 +08:00
Jeremy Grossmann
c6be1a28ae
Change first() to one_or_none() for image query 2026-03-14 19:06:27 +08:00
Mr.GIitch
302878b391
Merge branch 'GNS3:3.0' into 3.0 2026-03-12 14:44:43 +01:00
grossmj
3abecc8492
Fix IOU tests 2026-03-12 14:18:35 +08:00
grossmj
27ce1a4e25
Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	gns3server/schemas/iou_template.py
#	tests/handlers/api/compute/test_iou.py
#	tests/handlers/api/controller/test_template.py
2026-03-12 14:11:05 +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
f41cc24383
Fix for duplicating Qemu nodes 2026-03-12 13:24:30 +08:00
Jeremy Grossmann
9aca6aece3
Merge pull request #2636 from yueguobin/fix/acl-endpoint-paths
fix(acl): correct endpoint paths for users, groups, and roles
2026-03-12 12:31:59 +08:00
UmmmAGoodName
afeb6a3196 Minor optimizations to logic 2026-03-11 18:51:32 +01:00
UmmmAGoodName
99e3529c93 Fixed an issue with the server causing errors when uploading large images + Preparation for a smarter check when uploading images 2026-03-11 18:50:43 +01:00
UmmmAGoodName
19503ab4f7 Implementet a smarter node_type system 2026-03-11 18:49:36 +01:00
UmmmAGoodName
4a45a68703 Changed errors to new type, was causing warnings 2026-03-11 18:48:36 +01:00
Guobin Yue
085a485503
Merge branch '3.0' into fix/acl-endpoint-paths 2026-03-11 23:34:18 +08:00
YueGuobin
f2fd725e07 fix(acl): correct endpoint paths for users, groups, and roles
Fix the path mismatch between /acl/endpoints API and actual routes:
- Users: /users/{id} → /access/users/{id}
- Groups: /groups/{id} → /access/groups/{id}
- Roles: /roles/{id} → /access/roles/{id}

This fixes the error where creating ACE entries fails with:
"Path '/groups/{id}' doesn't match any existing endpoint"

The actual routes are registered under /access/ prefix, but the
endpoints API was returning paths without the prefix.

Co-Authored-By: Yue Guobin <yueguobin@outlook.com>
2026-03-11 23:23:52 +08:00
YueGuobin
0056bdd19b fix(iou): return 405 error for unsupported suspend operation
Fixed IOU node suspend API to return proper HTTP 405 Method Not Allowed
error instead of misleading 204 No Content response.

Changes:
- Added HTTPException import to iou_nodes.py
- Fixed suspend_iou_node route from /stop to /suspend (bug fix)
- Changed response from 204 No Content to 405 Method Not Allowed
- Added clear error message: "Suspend is not supported for IOU nodes"

This fix ensures clients receive explicit feedback when attempting to
suspend IOU nodes, which do not support suspend functionality.

Related issue: IOU nodes previously returned 404 when suspend was called
due to incorrect route registration.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-11 15:14:23 +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
69eafda777
Merge remote-tracking branch 'origin/2.2' into 3.0
# Conflicts:
#	gns3server/version.py
2026-03-09 17:12:24 +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
grossmj
73ffb22aa2
Bundle web-ui v3.1.0.dev1 2026-03-07 17:47:44 +08:00
Jeremy Grossmann
0cedab1742
Merge pull request #2632 from GNS3/drop-python3.9
Drop support for Python 3.9
2026-03-07 11:19:03 +08:00
grossmj
679c690903
Drop support for Python 3.9 2026-03-06 19:03:53 +08:00
Jeremy Grossmann
5755a48fa3
Merge pull request #2630 from UmmmAGoodName/3.0
Fixed the path traversal check
2026-03-06 18:05:57 +08:00
UmmmAGoodName
6ff4d46838 Fixed the path traversal check 2026-03-05 16:38:55 +01:00
Jeremy Grossmann
ea68d8b959
Merge pull request #2629 from GNS3/image-handling
Fix image handling
2026-03-05 12:43:47 +08:00
grossmj
4606613673
Fix image handling 2026-03-05 12:38:28 +08:00
Jeremy Grossmann
2843e05e01
Merge pull request #2627 from GNS3/bugfix/2622
Qemu VMs: only compute MD5 checksums for existing disks
2026-03-04 18:57:52 +08:00
grossmj
8b245c96f8
Qemu VMs: only compute MD5 checksums for existing disks 2026-03-04 18:54:52 +08:00
grossmj
5b00529666
Copy config files and database from a previous version if it exists 2026-03-04 17:23:10 +08:00
Jeremy Grossmann
a20e10f75a
Merge pull request #2625 from markparonyan/3.0
feat(compute): option to disable compute authentication
2026-03-04 16:40:58 +08:00
grossmj
7010baccee
Add enable_http_auth in gns3_server.conf sample 2026-03-04 16:35:26 +08:00
Mark Paronyan
c48c89d309
tests(compute): test compute works with disabled auth 2026-03-03 00:30:00 +03:00
Mark Paronyan
8c3aaa78f5
feat(compute): option to disable compute authentication 2026-03-03 00:28:57 +03:00
Jeremy Grossmann
dce4a71004
Merge pull request #2619 from yueguobin/fix/docker-container-name-conflict
fix(docker): handle container name conflict automatically
2026-02-28 12:56:24 +08:00
grossmj
151feb369f
Development on 3.1.0.dev1 2026-02-28 11:35:46 +08:00
YueGuobin
ce90b2b92c fix(docker): handle container name conflict automatically
When a Docker container with the same name already exists (e.g., from a
   previous crashed GNS3 session), Docker returns a 409 Conflict error
   when trying to create a new container with that name. This causes the
   project open operation to fail.

   This fix adds automatic cleanup of stale containers when encountering
   a name conflict:
   - Added DockerHttp409Error exception class
   - Updated http_query to detect 409 status codes
   - Modified create() to remove conflicting containers and retry

   Fixes the issue where opening a project fails with:
   "Docker has returned an error: 409 Conflict. The container name
   '/GNS3.xxx' is already in use by container 'xxx'"
2026-02-27 23:35:11 +08:00
Jeremy Grossmann
a0116902a6
Merge pull request #2618 from yueguobin/fix-port-nonename-error
feat(virtualbox): add fallback for VBoxManage executable detection
2026-02-27 00:39:31 +08:00
YueGuobin
a343ace637 Revert: restore original port name handling logic 2026-02-27 00:12:30 +08:00
YueGuobin
fe73d0e935 Merge branch 'fix-vboxmanage-case-sensitivity' into fix-port-nonename-error 2026-02-26 10:02:43 +08:00