From c4440d882d199003992c08b84071612183516ac8 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Wed, 3 Jun 2026 12:15:27 +0800 Subject: [PATCH] Add running project check for fast duplication Add is_running() check at the beginning of _fast_duplication() to prevent duplicating a project while nodes are running. Previously, only the export/import fallback path had this check, which meant running nodes were not detected when fast duplication succeeded. This aligns with the duplicate API behavior and provides a consistent safeguard against data inconsistencies. --- gns3server/controller/project.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index f6697dfaa..0526df838 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -1404,6 +1404,10 @@ class Project: :param reset_mac_addresses: Reset MAC addresses for the duplicated project """ + # We don't duplicate a running project + if self.is_running(): + raise ControllerError("Project must be stopped in order to duplicate it") + # remote replication is not supported with remote computes for compute in self.computes: if compute.id != "local":