Yeela Kaplan has uploaded a new change for review.
Change subject: Catch exception thrown by forceIScsiScan causing disconnect to fail
......................................................................
Catch exception thrown by forceIScsiScan causing disconnect to fail
Change-Id: Id209743bc8a4bff4fc5a571974bded4e5f08ffc2
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=868681
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/iscsi.py
1 file changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/8820/1
diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py
index 2c1707f..3098188 100644
--- a/vdsm/storage/iscsi.py
+++ b/vdsm/storage/iscsi.py
@@ -361,9 +361,13 @@
for hba in glob.glob(SCAN_PATTERN):
cmd = [constants.EXT_DD, 'of=' + hba]
p = misc.execCmd(cmd, sudo=False, sync=False)
- p.stdin.write("- - -")
- p.stdin.flush()
- p.stdin.close()
+ try:
+ p.stdin.write("- - -")
+ p.stdin.flush()
+ p.stdin.close()
+ except OSError as e:
+ log.warning("Error when writing to hba %s: %s ", hba, e)
+ continue
processes.append((hba, p))
if (minTimeout > maxTimeout or minTimeout < 0):
minTimeout = 2
--
To view, visit
http://gerrit.ovirt.org/8820
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id209743bc8a4bff4fc5a571974bded4e5f08ffc2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>