mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-18 09:00:07 +03:00
Updating any Docker node property destroys and recreates the container (the route calls DockerVM.update() as soon as the property diff is non-empty), so it discards everything written inside it. On a running node that happened silently, as a side effect of an unrelated edit: the user only saw the node restart. Refuse the update while the container is up and say what stopping it is for, like QEMU, IOU, Dynamips, VPCS, VirtualBox and VMware already do for their own restart-requiring settings. The check runs before anything is applied — a refused update leaves the node untouched — and only when the PUT really changes a property, since Web clients send the whole node back on every edit. is_running() is not reusable for the question: it reports a paused container as not running and stops crashed containers as a side effect, so DockerVM gains is_up() for "running or paused".