From e6d94fe0b01eef35434cbb9ee9259c536257f6ce Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Thu, 10 Dec 2015 16:42:14 -0500 Subject: [PATCH] ScaleIO could connect wrong volume to VM When running multiple attach volume operations with multiple volumes and multiple VMs, a wrong volume could end up being attached to a VM. To fix this, connect_volume and disconnect_volume should be locked. Change-Id: I47e94a945938123a913aee9d52d36f8ee088955a Closes-Bug: #1524989 --- os_brick/initiator/connector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os_brick/initiator/connector.py b/os_brick/initiator/connector.py index c1b369b18..cda367788 100644 --- a/os_brick/initiator/connector.py +++ b/os_brick/initiator/connector.py @@ -2413,6 +2413,7 @@ class ScaleIOConnector(InitiatorConnector): 'path': self.volume_path} return device_info + @lockutils.synchronized('scaleio', 'scaleio-') def connect_volume(self, connection_properties): """Connect the volume. @@ -2541,6 +2542,7 @@ class ScaleIOConnector(InitiatorConnector): return device_info + @lockutils.synchronized('scaleio', 'scaleio-') def disconnect_volume(self, connection_properties, device_info): """Disconnect the ScaleIO volume.