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
filesystem.

Fixes issue 262.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 15361a18
......@@ -9038,7 +9038,7 @@ def _RemoveDisks(lu, instance, target_node=None, ignore_failures=False):
for port in ports_to_release:
lu.cfg.AddTcpUdpPort(port)
 
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