Commit e5dfc531 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix removal of storage directory on shared file storage

This patch makes _RemoveDisks symmetric to _CreateDisks with respect
to file-based storage: _CreateDisks uses "in constants.DTS_FILEBASED",
whereas _RemoveDisks was not update and only uses "==
constants.DT_FILE". This results in stale directories left on the

Fixes issue 262.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 15361a18
......@@ -9038,7 +9038,7 @@ def _RemoveDisks(lu, instance, target_node=None, ignore_failures=False):
for port in ports_to_release:
if instance.disk_template == constants.DT_FILE:
if instance.disk_template in constants.DTS_FILEBASED:
file_storage_dir = os.path.dirname(instance.disks[0].logical_id[1])
if target_node:
tgt = target_node
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