Commit 5500ca1f authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'stable-2.2' into stable-2.3



* 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 563d5e72 3721d2fe
......@@ -1005,10 +1005,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))
# Force update of ssconf files
self._config_data.cluster.serial_no += 1
......
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