Commit 2590d723 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

Support spindles in move-instance

The script was failing when exclusive storage was active (bug introduced in

Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarMichele Tartara <>
parent 802ed2aa
......@@ -486,11 +486,17 @@ class MoveDestExecutor(object):
disk_template = instance["disk_template"]
disks = [{
constants.IDISK_SIZE: i["size"],
constants.IDISK_MODE: i["mode"],
constants.IDISK_NAME: str(i.get("name")),
} for i in instance["disks"]]
disks = []
for idisk in instance["disks"]:
odisk = {
constants.IDISK_SIZE: idisk["size"],
constants.IDISK_MODE: idisk["mode"],
constants.IDISK_NAME: str(idisk.get("name")),
spindles = idisk.get("spindles")
if spindles is not None:
odisk[constants.IDISK_SPINDLES] = spindles
nics = [{
constants.INIC_IP: ip,
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