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

Fix _RemoveDisk for file based instances

During 621b7678

 two typos were introduced which prevent file based
instances removal to work correctly. Fixing both of them to what they
were meant to be.
Signed-off-by: default avatarGuido Trotter <>
Reviewed-by: default avatarIustin Pop <>
parent a5b360e4
......@@ -5258,10 +5258,10 @@ def _RemoveDisks(lu, instance, target_node=None):
if instance.disk_template == constants.DT_FILE:
file_storage_dir = os.path.dirname(instance.disks[0].logical_id[1])
if target_node is node:
tgt = instance.primary_node
if target_node:
tgt = target_node
tgt = instance.target_node
tgt = instance.primary_node
result = lu.rpc.call_file_storage_dir_remove(tgt, file_storage_dir)
if result.fail_msg:
lu.LogWarning("Could not remove directory '%s' on node %s: %s",
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