From 2f7228ae6a10c0da49c67b873c22112ac26d0657 Mon Sep 17 00:00:00 2001 From: Pedro Navarro Perez Date: Tue, 12 Mar 2013 04:48:02 -0700 Subject: [PATCH] Fixes dettach volumes in Windows cinder plugin The patch fixes issues when desassigning target to initiators in the terminate_connection method. The method now takes the right parameter coming from provider location. Change-Id: I2ea1ac7f46e3a24a6493af8eba46a113126e1117 Fixes: bug #1153968 (cherry picked from commit 6de6cfebd4398c9912eb1683c91226d5d27cf7e4) --- cinder/volume/drivers/windows.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/windows.py b/cinder/volume/drivers/windows.py index 89038b052..a0113b153 100644 --- a/cinder/volume/drivers/windows.py +++ b/cinder/volume/drivers/windows.py @@ -119,10 +119,11 @@ class WindowsDriver(driver.ISCSIDriver): longer access it. """ initiator_name = connector['initiator'] + provider_location = volume['provider_location'] #DesAssigning target to initiators - wt_idmethod = self._conn_wmi.WT_IDMethod(HostName=volume['name'], + wt_idmethod = self._conn_wmi.WT_IDMethod(HostName=provider_location, Method=4, - Value=initiator_name) + Value=initiator_name)[0] wt_idmethod.Delete_() def create_volume(self, volume): -- 2.45.2