Commit Graph
7448 Commits
Author SHA1 Message Date
YueGuobin 7c90fa9e64 fix(marker): ride markers on NIO so they survive node restart and project reload
Mirror the packet-filter lifecycle: marker specs now live on the NIO
(next to filters), ride in link_data from controller to compute on
every NIO create/update, and are reapplied by _ubridge_apply_markers
in add_ubridge_udp_connection (bridge creation / node restart) and
update_ubridge_udp_connection (NIO update — following the preceding
reset_packet_filters so markers survive filter changes).

Changes:
- NIO / NIOUDP: _markers property + asdict
- schemas/compute/nios.py: UDPNIO.markers field
- base_manager.create_nio: nio.markers from settings
- PUT /nio routes (vpcs/qemu/docker): nio.markers update
- base_node: _ubridge_apply_markers(bridge_name, nio) iterates
  nio.markers, computes pcap path, calls _ubridge_add_marker_filter
  + MarkerManager.register; called after _ubridge_apply_filters
- controller udp_link: _get_node_markers + _markers_for_node (route
  by capture_node_id); markers in create() and update() link_data
- /markers/start,stop endpoints: mirror spec onto nio.markers so
  the marker survives a subsequent node stop/start without a PUT
- tests: add markers field to NIO data expectations

This covers:
- Node restart: NIO persists, add_ubridge_udp_connection re-applies
- Filter update: reset wipes markers, _ubridge_apply_markers re-adds
- Project reload: create() carries markers in link_data → create_nio
- Immediate create: endpoint sets nio.markers immediately
2026-07-16 00:39:51 +08:00
YueGuobin 540e1c5678 config: set marker_listen_port default to 3070 and document in config templates
Change the marker UDP sink default from port=0 (OS-chosen) to 3070 for
predictable firewall/debugging/monitoring.

Add marker_listen_host and marker_listen_port with documentation to
config_samples/gns3_server.conf and scripts/gns3_server.conf.
2026-07-16 00:39:51 +08:00
YueGuobin 88465e872c fix(marker): add _choose_marker_side to exclude non-uBridge node types
_choose_capture_side prefers BUILTIN_NODE_TYPES which includes
ethernet_switch/ethernet_hub/NAT etc. — nodes that do not use uBridge
and therefore have no bridge for a marker filter to attach to.

Add _choose_marker_side with a _MARKER_UNSUPPORTED_TYPES blocklist
so marker capture-side selection skips NIO-only switches and picks
the uBridge-backed node (VPCS/QEMU/Docker/etc.) instead.

Verified end-to-end: PC1↔Switch↔PC2 links with arp markers correctly
pick VPCS nodes; MARK signals flow through to WebSocket and pcaps
are written.
2026-07-16 00:39:51 +08:00
YueGuobin d2e9823e6c feat: implement traffic insight marker backend (ubridge mark filter)
Add compute-side marker subsystem that receives ubridge UDP MARK signals
and forwards them as project-scoped notifications to the web UI for
real-time traffic coloring. Matched packets are always saved to per-link
pcaps for future replay.

Key components:
- gns3server/compute/marker/: MarkerManager (singleton, UDP listener +
  O(1) registry keyed by (node_id, filter_name)) + MarkerListener
  (DatagramProtocol parsing MARK lines per ubridge integration contract)
- gns3server/compute/base_node.py: marker sink/node config at ubridge
  startup; shared _ubridge_add_marker_filter / _ubridge_delete_marker_filter
- Per-node start_marker/stop_marker: VPCS (VPCS-{id}), QEMU
  (QEMU-{id}-{adapter}), Docker (bridge{adapter})
- Compute REST /markers/start + /markers/stop (vpcs/qemu/docker route files)
- Controller Link._markers state + UDPLink.start_marker/stop_marker/
  update_marker (mirror capture pattern: BPF validation, _choose_capture_side,
  node.post forwarding, topology persistence)
- Controller REST GET/POST/DELETE/PUT /v3/projects/{p}/links/{l}/markers
- Config: marker_listen_host / marker_listen_port in ServerSettings
- Signal routing: creation-time registry O(1) lookup, no node-table scan;
  project-scoped WS stream (not global); event payload always carries
  project_id for frontend scoping

Tests: 14 unit tests (registry, listener parsing, UDP round-trip);
562 existing tests pass with zero regressions.
2026-07-16 00:39:51 +08:00
grossmj 803cc17410 Release v2.2.60 v2.2.60 2026-07-15 18:36:26 +02:00
grossmj f088c55cfe Sync appliances 2026-07-15 18:32:12 +02:00
Jeremy Grossmann 8a8864c90b Merge pull request #2814 from GNS3/bugfix/2783
fix(import): project import does not move images symlinks into place
2026-07-15 09:53:15 +02:00
grossmj 1986bce538 Only set IOU images to be executable when importing images 2026-07-15 09:43:34 +02:00
grossmj c528d2cd95 fix(import): project import does not move images symlinks into place 2026-07-13 18:19:52 +02:00
Jeremy Grossmann 7529ee4168 Merge pull request #2813 from GNS3/uefi-improvements
UEFI improvements for Qemu VMs
2026-07-13 12:05:07 +02:00
grossmj 61c7f4469d Search for system UEFI that is compatible with Python < 3.12 2026-07-13 11:34:29 +02:00
grossmj 896b4fc56a UEFI improvements for Qemu VMs
* Add OVMF firmware directory configuration
* Automatically add a Random Number Generator (RNG) device when using uefi option is enabled
2026-07-13 11:08:17 +02:00
grossmj a58fa8602b remove wrongly merged code 2026-07-13 10:05:01 +02:00
YueGuobin d8f8b6ec70 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-07-13 09:57:55 +02:00
grossmj 01d72aed9a Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/controller/__init__.py
#	gns3server/controller/project.py
2026-07-13 09:32:07 +02:00
Jeremy Grossmann b256d5a5f6 Merge pull request #2812 from GNS3/bugfix/2788
fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project
2026-07-12 13:50:11 +02:00
grossmj ea09cc2724 fix: gns3-server crashes on startup if "Open this project in the background" is active but there is a problem with that project 2026-07-12 13:46:12 +02:00
grossmj e3e0a511b6 Handle HTTPNotFound exception when retrieving compute status 2026-07-12 11:08:13 +02:00
grossmj 0ecaab4da0 Replace ControllerForbiddenError with aiohttp.web.HTTPForbidden for project deletion error handling 2026-07-12 11:05:15 +02:00
YueGuobinandClaude Opus 4.6 40644f33e6 Fix: Check compute connectivity before open() during project deletion
Previously the disconnected compute check ran after open(), which would
block for 120s trying to connect to unreachable remote computes before
rejecting the deletion. Now reads the topology file directly to extract
compute IDs and checks connectivity before calling open(), enabling
immediate rejection of deletions involving offline computes.

Also removes the redundant post-open() check since the early check
covers both opened and closed project states.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-07-12 10:57:56 +02:00
grossmj a9cce209d7 Development on 3.1.0.dev5 2026-07-10 10:01:35 +02:00
Jeremy Grossmann 94a131dab3 Merge pull request #2810 from yueguobin/feature/cloud-host-interface-ip-addresses
Expose full host interface IP addresses and link state in cloud node API
2026-07-10 09:19:54 +02:00
YueGuobin 0ed1715fe6 Use typed InterfaceStatus enum and simplify stats fallback in interfaces()
- Change `status: str` to `status: InterfaceStatus` (str Enum) in the
  HostInterface schema, matching the existing IPAddressFamily pattern.
- Use default-then-override pattern in interfaces() to eliminate the
  `else` branch and deduplicate defaults.
2026-07-10 14:55:21 +08:00
YueGuobin 9721660cc3 Expose full interface address list and link state in cloud node API
Each host interface surfaced by the cloud node now reports:
- ip_addresses: every IPv4 and IPv6 address (previously only a single
  IPv4 was collected internally and then dropped before the response)
- status / speed / mtu / flags: operational state and link attributes
  sourced from psutil.net_if_stats(), with flags normalized to a list

The legacy ip_address / netmask / mac_address fields are preserved so
existing callers (compute link detection, GNS3 VM, VMware, has_netmask)
keep working. The new fields travel through the existing interfaces
payload that the controller forwards verbatim, so no controller-side
change is required and the PUT / ports_mapping flow is unaffected.
2026-07-10 13:56:07 +08:00
grossmj a66740e154 Add script to create and push annotated git tags from version.py 2026-07-09 11:02:33 +02:00
grossmj 913d021705 Release v3.1.0a4 v3.1.0a4 2026-07-09 10:40:38 +02:00
grossmj d64fdd71a9 Bundle web-ui v3.1.0a4 2026-07-09 08:40:05 +02:00
Jeremy Grossmann bdd73be6d6 Merge pull request #2808 from yueguobin/docs/jwt-refresh-token-config-example
Add jwt_refresh_token_expire_minutes to sample configuration
2026-07-09 08:34:25 +02:00
Guobin Yue 61ce59788b Merge branch '3.1' into docs/jwt-refresh-token-config-example 2026-07-09 14:19:14 +08:00
YueGuobin cccc3e5b77 Add jwt_refresh_token_expire_minutes to sample configuration
The sample gns3_server.conf documented jwt_access_token_expire_minutes but omitted jwt_refresh_token_expire_minutes (default 43200 minutes, 30 days) defined in ControllerSettings. Add it for parity with the schema.
2026-07-09 14:15:49 +08:00
grossmj 6fba497734 Remove deleted web-ui files from git 2026-07-08 22:40:27 +02:00
grossmj 54540e7ef7 Merge remote-tracking branch 'origin/3.1' into 3.1 2026-07-08 21:49:20 +02:00
grossmj 5992a284c9 Bundle web-ui v3.1.0a4 2026-07-08 21:48:48 +02:00
grossmj a2ee5389af Bundle web-ui v3.1.0a4 2026-07-08 20:11:59 +02:00
grossmj 4548d9053a Sync appliances 2026-07-08 18:45:07 +02:00
grossmj 2d3bb89e58 Merge remote-tracking branch 'origin/2.2' into 3.1 2026-07-08 10:33:00 +02:00
grossmj 809d4cc609 Merge branch 'master' into 2.2
# Conflicts:
#	.github/workflows/docker-build.yml
2026-07-08 10:30:53 +02:00
Jeremy Grossmann 89e4e836c9 Merge pull request #2806 from my-code-is-grey/2798-dockerhub
#2798 - DockerHub adjustments
2026-07-08 05:17:04 +02:00
my-code-is-grey 69ddcf553f .dockerignore ignore .dockerignore 2026-07-07 22:37:24 -04:00
my-code-is-grey 1e1ec5aae8 typo made me reconsider and move out to env 2026-07-07 21:58:49 -04:00
my-code-is-grey e30e6435ca defaulted DOCKERHUB_ORG repository variable 2026-07-07 21:48:13 -04:00
my-code-is-grey 77700f361c 2798 2026-07-07 01:30:58 -04:00
grossmj e3e3a7e729 Update fastapi to v0.139.0 2026-07-06 19:21:56 +02:00
grossmj 6415d2e56c Update dependencies 2026-07-06 19:06:25 +02:00
grossmj 424ae55c38 Revert "Update dependencies"
This reverts commit b6793a50f3.
2026-07-06 18:38:48 +02:00
grossmj b6793a50f3 Update dependencies 2026-07-06 18:31:52 +02:00
grossmj 562108748a Remove API docs from 2.2 after merging 2026-07-06 18:17:00 +02:00
grossmj d54b16df53 Merge branch '2.2' into 3.1
# Conflicts:
#	gns3server/handlers/api/controller/template_handler.py
#	tests/handlers/api/controller/test_template.py
2026-07-06 18:13:17 +02:00
Jeremy Grossmann ad4aa1d49b Merge pull request #2803 from GNS3/update-ga-workflows
Update GitHub Actions workflows
2026-07-06 18:10:17 +02:00
grossmj 8499ed3d65 Update GitHub Actions workflows 2026-07-06 18:05:28 +02:00