mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 12:30:13 +03:00
fix: send relative image path to remote compute nodes
When creating a node on a remote compute, the controller now sends only the image filename instead of the absolute local path. The remote compute will search for the image in its own configured images_directories. If the image is not found, the compute returns ImageMissingError, which triggers the controller's automatic image upload mechanism. This fixes issue #2676 where remote computes reject paths from the controller due to mismatched directory prefixes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c45f6d9416
commit
11fb5de84e
@ -539,6 +539,12 @@ class Node:
|
||||
del data[k]
|
||||
del self._properties[k] # We send the file only one time
|
||||
data["name"] = self._name
|
||||
|
||||
# For remote computes, convert absolute image paths to relative paths
|
||||
# The remote compute will search for the image in its own configured directories
|
||||
if self._compute.id != "local" and "path" in data and os.path.isabs(data["path"]):
|
||||
data["path"] = os.path.basename(data["path"])
|
||||
|
||||
if self._console:
|
||||
# console is optional for builtin nodes
|
||||
data["console"] = self._console
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user