Commit Graph
5516 Commits
Author SHA1 Message Date
Mark Paronyan 5cb1b8e3d2 fix(typing): resolve mypy errors in agent.gns3_copilot.utils.message_converters 2026-09-29 08:52:37 +03:00
Jeremy Grossmann b9192438c9 Merge pull request #2902 from markparonyan/mypy-services-authentication
fix(typing): resolve mypy errors in services.authentication
2026-09-28 23:34:47 +02:00
Jeremy Grossmann 884526c3be Merge pull request #2900 from markparonyan/mypy-compute-iou-vm
fix(typing): resolve mypy errors in compute.iou.iou_vm
2026-09-28 23:33:41 +02:00
Jeremy Grossmann f19274891c Merge pull request #2898 from markparonyan/mypy-schemas-dynamips-templates
fix(typing): resolve mypy errors in schemas.controller.templates.dynamips_templates
2026-09-28 23:33:22 +02:00
Jeremy Grossmann 7864a4e567 Merge pull request #2897 from markparonyan/mypy-api-controller-links
fix(typing): resolve mypy errors in api.routes.controller.links
2026-09-28 23:26:48 +02:00
Jeremy Grossmann f6ee1ee01a Merge pull request #2896 from markparonyan/mypy-api-compute-qemu-nodes
fix(typing): resolve mypy errors in api.routes.compute.qemu_nodes
2026-09-28 23:25:55 +02:00
Jeremy Grossmann 35e1abcaf2 Merge pull request #2895 from markparonyan/mypy-agent-agent-service
fix(typing): resolve mypy errors in agent.gns3_copilot.agent_service
2026-09-28 20:56:12 +02:00
Jeremy Grossmann 02d02cceca Merge pull request #2899 from markparonyan/mypy-db-models-base
fix(typing): resolve mypy errors in db models
2026-09-28 20:52:55 +02:00
Jeremy Grossmann 71965e0e81 Merge pull request #2894 from markparonyan/mypy-utils-zipfile-zstd
fix(typing): resolve mypy errors in utils.zipfile_zstd
2026-09-28 20:50:20 +02:00
Jeremy Grossmann 4ea31f98b7 Merge pull request #2893 from markparonyan/mypy-agent-mcp
fix(typing): resolve mypy errors in agent.mcp
2026-09-28 20:49:10 +02:00
Mark Paronyan 9f36fb4500 fix(typing): resolve mypy errors in services.authentication 2026-09-28 21:48:40 +03:00
Mark Paronyan 4802c865fc fix(typing): resolve mypy errors in compute.iou.iou_vm 2026-09-28 21:48:18 +03:00
Mark Paronyan db265f9524 fix(typing): resolve mypy errors in db models 2026-09-28 21:48:06 +03:00
Mark Paronyan 6f3e5cfc2b fix(typing): resolve mypy errors in schemas.controller.templates.dynamips_templates 2026-09-28 21:47:56 +03:00
Mark Paronyan ecff4beb65 fix(typing): resolve mypy errors in api.routes.controller.links 2026-09-28 21:47:46 +03:00
Mark Paronyan b8a51fdefc fix(typing): resolve mypy errors in api.routes.compute.qemu_nodes 2026-09-28 21:47:36 +03:00
Mark Paronyan 644ed63334 fix(typing): resolve mypy errors in agent.gns3_copilot.agent_service 2026-09-28 21:47:26 +03:00
Mark Paronyan 3fc1d27937 fix(typing): resolve mypy errors in utils.zipfile_zstd 2026-09-28 21:47:05 +03:00
Mark Paronyan 6ffa39642f fix(typing): resolve mypy errors in agent.mcp 2026-09-28 21:41:58 +03:00
Mark Paronyan 8c0a5404ac Merge branch '3.1' into mypy-compute-qemu-vm 2026-09-28 12:39:38 +03:00
Mark Paronyan 525ef8ca57 fix(typing): resolve mypy errors in compute.qemu.qemu_vm 2026-09-28 12:37:28 +03:00
Jeremy Grossmann 79ecb15164 Merge pull request #2888 from markparonyan/mypy-compute-vmware-vm
fix(typing): resolve mypy errors in compute.vmware.vmware_vm
2026-09-28 11:06:12 +02:00
Jeremy Grossmann 310bb193a5 Merge pull request #2887 from markparonyan/mypy-compute-docker-vm
fix(typing): resolve mypy errors in compute.docker vm modules
2026-09-28 11:03:44 +02:00
Jeremy Grossmann ccee503b74 Merge pull request #2891 from markparonyan/mypy-controller-compute
fix(typing): resolve mypy errors in controller.compute
2026-09-28 11:01:30 +02:00
Jeremy Grossmann 10b5c1bb6b Merge branch '3.1' into mypy-compute-project 2026-09-28 10:55:25 +02:00
Jeremy Grossmann 0bd1204d15 Merge pull request #2884 from markparonyan/mypy-config
fix(typing): resolve mypy errors in config
2026-09-28 10:54:17 +02:00
Jeremy Grossmann 0718e038f7 Merge pull request #2883 from markparonyan/mypy-utils-embed-shell
fix(typing): resolve mypy errors in utils.asyncio.embed_shell
2026-09-28 10:47:23 +02:00
Mark Paronyan 21643fe89d fix(typing): resolve mypy errors in controller.compute 2026-09-28 04:56:59 +00:00
Mark Paronyan d1df96e0a6 fix(typing): resolve mypy errors in utils.asyncio.embed_shell 2026-09-28 04:56:18 +00:00
Mark Paronyan fdfb2d5591 fix(typing): resolve mypy errors in compute.vmware.vmware_vm 2026-09-28 04:55:44 +00:00
Mark Paronyan 667b0531f6 fix(typing): resolve mypy errors in compute.project 2026-09-28 04:55:38 +00:00
Mark Paronyan b8ae84031e fix(typing): resolve mypy errors in compute.docker vm modules 2026-09-28 04:55:32 +00:00
Mark Paronyan f858ae23a6 fix(typing): resolve mypy errors in api.routes.index 2026-09-28 04:55:30 +00:00
Mark Paronyan 2512556770 fix(typing): resolve mypy errors in config 2026-09-28 04:55:20 +00:00
grossmj 8df25dec32 Development on 3.1.0.dev7 2026-09-27 20:21:12 +02:00
grossmj 4fa4ef7c2f Release v3.1.0a6 2026-09-27 19:18:25 +02:00
grossmj 3f2afb0e4a Bundle web-ui v3.1.0a6 2026-09-27 19:10:11 +02:00
grossmj 1f3d00dd1a Merge remote-tracking branch 'origin/update-dependencies' into update-dependencies 2026-09-27 19:01:56 +02:00
grossmj b96774d1f7 Sync appliances 2026-09-27 18:59:42 +02:00
Mark Paronyan a0450b6bce refactor: ruff autofixes 2026-09-27 15:55:10 +03:00
Mark Paronyan 8dfe05df3d chore: justfile with mypy, ruff, pytest checks 2026-09-27 15:43:18 +03:00
Jeremy Grossmann efd6bb77fe Merge pull request #2878 from cristian-ciobanu/project-missing-images
Allow projects containing unavailable images to open in a degraded state instead of failing to load
2026-09-22 15:34:36 +02:00
grossmj 34923e46e0 chore(docs): update gns3_server.conf sample about the default NAT interface 2026-09-22 14:56:58 +02:00
Cristi da16dc9874 fix(qemu): Fixed missing image replacement for linked-clone nodes 2026-09-18 23:58:49 +03:00
Cristi 59a367b88d Allow projects containing missing images to open in a degraded state instead of failing to load 2026-09-18 15:06:17 +03:00
YueGuobin 84e7ead465 fix: make node working directory deletion robust
The rmtree error handler in BaseNode.delete() was chmod'ing the failed
path to S_IWRITE (0o200). On POSIX this strips the search permission
from directories, turning a transient deletion failure into a directory
that can no longer be traversed or deleted. The node deletion itself
silently "succeeds" (rmtree gives up once its error handler returns)
and a later project deletion then fails with EACCES. The handler also
never retried the failed operation, so it did not help on Windows
either (the platform it was written for).

The transient failure exists in practice: a concurrent MD5 checksum
computation caching its result in the node directory (e.g. a properties
request racing the deletion) can recreate a file after rmtree has
listed the directory, making the final rmdir fail with ENOTEMPTY.

- add the missing user permissions instead of replacing the whole mode,
  and retry the failed unlink/rmdir
- retry the whole deletion a few times to absorb files recreated while
  the directory is being deleted
- raise a ComputeError when the directory cannot be fully deleted
  instead of failing silently
2026-09-15 01:23:31 +08:00
YueGuobin be62e8c022 feat: keep Docker images on computes consistent with the controller host
Only relying on the image name lets a moved tag (e.g. a newer :latest)
silently serve stale content from a compute that already has an image
under the same name. When creating a Docker node, the controller now
pins the image id (Id from the Docker daemon on the controller host)
into the create payload. A compute holding a different image under the
same tag reports the image as missing, which routes it through the
image sync added by the previous commit and re-aligns the tag.

No new template fields or database changes: the controller host daemon
remains the source of truth and the pin is resolved per creation. When
the image is not available on the controller host the pin is omitted
and behavior is unchanged (the compute pulls from the repository).
2026-09-14 00:55:18 +08:00
YueGuobin c477812332 feat: sync Docker images from the controller to remote computes
When a Docker node is created on a remote compute whose Docker daemon
does not have the image, the compute now raises ImageMissingError
instead of blindly pulling from the Docker repository. The controller
exports the image from the Docker daemon on its host (docker save
stream) and streams it to the compute which loads it, so locally built
or docker-loaded images work across computes. When the image is not
available on the controller host either, the compute is asked to pull
it from the Docker repository as a fallback.

- add a POST /docker/images/load compute endpoint that streams a
  docker save tar into the Docker daemon
- let Docker.http_query pass raw (non-dict) request bodies through so
  the tar can be streamed to the daemon
- drop the inline pull from DockerVM.create() and the now unused
  DockerVM.pull_image wrapper
2026-09-14 00:36:54 +08:00
YueGuobin 4b239cc11a fix: run the reclaim helper as root regardless of the image's default USER
The one-shot reclaim container inherited the image's baked-in USER:
ghcr.io/nokia/srlinux runs as "user:user", so the "privileged" helper
was exactly as unprivileged as the server itself — chmod/chown on files
written by other uids (srlinux writes as a large internal uid) failed
with EPERM and node/project deletion still broke, just with a different
error. Pass --user 0:0 explicitly so the helper is root no matter what
the image declares, and fix the manual reclaim hint the same way.

Validated live on two stuck srlinux node directories (257/258
foreign-owned entries reclaimed to 0 in ~0.5 s each).
2026-09-12 23:15:52 +08:00
YueGuobin 54d9d7c08f fix: reclaim root-owned container files so docker nodes and projects can be deleted
The stop-time permission pass necessarily runs before the container's
processes exit, so files written during the shutdown window (syslog
archives, trace flushes) and after any SIGKILL path stay owned by root
on the host. An unprivileged server can neither chown nor delete them,
which broke node deletion and project deletion.

Reclaim them through the only privilege door a non-root server has:
a one-shot throwaway container of the node's own image, entrypoint
overridden to the GNS3 busybox (nothing of the guest boots), chowning
the node directory back to the server user. It runs at the end of
close() — project deletion rmtrees the directory right after the nodes
close, so close must leave a clean tree — and as a retry fallback in
delete(). The helper resolves the image by its create-time ID with
--pull=never, so a stale or retagged image name cannot turn into a
registry pull attempt.
2026-09-12 23:04:28 +08:00