Change in vdsm[master]: storageServer: Wait for udev events after connect
nsoffer at redhat.com
nsoffer at redhat.com
Fri Mar 27 16:57:18 UTC 2015
Nir Soffer has uploaded a new change for review.
Change subject: storageServer: Wait for udev events after connect
......................................................................
storageServer: Wait for udev events after connect
Connecting to iSCSI target starts a storm of udev events, that may not
be handled yet when iscsiadm terminates. This may lead to missing
devices and failures when creating storage domain.
Now we wait until current udev events are handled after connecting,
using new udevadm.settle(). The timeout can be configured using the
new irs:scsi_settle_timeout option.
Change-Id: Ic8b2043dc4ac410cf08c7b49b6435a818f20d995
Bug-Url: https://bugzilla.redhat.com/1205877
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/storage/storageServer.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/39289/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 8a2d939..22a90d1 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -30,6 +30,7 @@
import sys
from vdsm.compat import pickle
+from vdsm.config import config
import mount
import fileUtils
@@ -38,6 +39,7 @@
from sync import asyncmethod, AsyncCallStub
from mount import MountError
import storage_exception as se
+import udevadm
class AliasAlreadyRegisteredError(RuntimeError):
@@ -379,6 +381,8 @@
def connect(self):
iscsi.addIscsiNode(self._iface, self._target, self._cred)
+ timeout = config.getint("irs", "scsi_settle_timeout")
+ udevadm.settle(timeout)
def _match(self, session):
target = session.target
--
To view, visit https://gerrit.ovirt.org/39289
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic8b2043dc4ac410cf08c7b49b6435a818f20d995
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list