Zhou Zheng Sheng has uploaded a new change for review.
Change subject: storage connection monitor: don't recover an unmanaged connection
......................................................................
storage connection monitor: don't recover an unmanaged connection
A connection can be deleted (unmanage) when the storage connection
monitor thread is in in Event.wait(). When the monitor thread continues
to execute, it thinks the connection is lost and try to recover it, but
the fact is it is unmanaged. This bug prevent iscsi connections from
releasing cleanly.
This patch checks if the connection is still managed by the monitor
before recovering it.
Change-Id: I9bc2b1f18f3421039b1d85d1e7a47c746ebfc31a
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M vdsm/storage/storageServer.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/10297/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index b457d5b..4baf042 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -651,6 +651,12 @@
if self._stopEvent.isSet():
break
+ with self._conDictLock:
+ if conId not in self._conDict:
+ # the connection is deleted when we were in wait for the
+ # stop event, so skip it
+ continue
+
if con.isConnected():
continue
--
To view, visit
http://gerrit.ovirt.org/10297
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bc2b1f18f3421039b1d85d1e7a47c746ebfc31a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>