Commit be9f4904 authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'stable-2.2' into devel-2.2



* stable-2.2:
  Fix rename for file-backed instances
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parents cdb303ab 3721d2fe
......@@ -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],
utils.PathJoin(file_storage_dir,
inst.name,
disk.iv_name))
disk_fname))
self._config_data.instances[inst.name] = inst
self._WriteConfig()
......
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