]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes cinder volume attach on Windows
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Fri, 28 Mar 2014 08:57:13 +0000 (10:57 +0200)
committerjohn-griffith <john.griffith@solidfire.com>
Tue, 1 Apr 2014 21:16:03 +0000 (15:16 -0600)
The initiator name and the target name are inverted when passing
the arguments to the method which associates the iSCSI target to
an initiator. For this reason, this operation will fail.

Also, the connection to the iSCSI target cannot be initialized
properly as the method which gets portal information is missing
the return value.

Change-Id: I31034cd407d12d69a410f8c9e86a2e6821349dad
Closes-Bug: #1299131
(cherry picked from commit 23e820abb8685573f97f5e3764225a97dd695127)

cinder/volume/drivers/windows/windows.py
cinder/volume/drivers/windows/windows_utils.py

index 68beda628bd22b65efd27891a9a6f49fa1ee322c..9b8b14b5812864edf44da24cf93160fd5ed0153b 100644 (file)
@@ -68,8 +68,8 @@ class WindowsDriver(driver.ISCSIDriver):
         initiator_name = connector['initiator']
         target_name = volume['provider_location']
 
-        self.utils.associate_initiator_with_iscsi_target(target_name,
-                                                         initiator_name)
+        self.utils.associate_initiator_with_iscsi_target(initiator_name,
+                                                         target_name)
 
         properties = self.utils.get_host_information(volume, target_name)
 
index 6e18fe76c6f4cde562442ff5ca904ca687220a1a..5edbf154c7dd4b1eb941bbac44871f87c0d37dd2 100644 (file)
@@ -90,6 +90,8 @@ class WindowsUtils(object):
             properties['auth_username'] = auth_username
             properties['auth_password'] = auth_secret
 
+        return properties
+
     def associate_initiator_with_iscsi_target(self, initiator_name,
                                               target_name):
         """Sets information used by the iSCSI target entry."""