Commit 3721d2fe authored by Guido Trotter's avatar Guido Trotter
Browse files

Fix rename for file-backed instances

Currently the code wrongly changes the disk logical/physical id
component representing the path from "$storage_dir/$iname/disk$seq" to
"$storage_dir/$iname/disk/$seq" (note the additional slash) breaking the
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarRené Nussbaumer <>
Reviewed-by: default avatarIustin Pop <>
parent 2596526d
......@@ -924,10 +924,11 @@ class ConfigWriter:
if disk.dev_type == constants.LD_FILE:
# rename the file paths in logical and physical id
file_storage_dir = os.path.dirname(os.path.dirname(disk.logical_id[1]))
disk_fname = "disk%s" % disk.iv_name.split("/")[1]
disk.physical_id = disk.logical_id = (disk.logical_id[0],
self._config_data.instances[] = inst
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment