Eduardo has posted comments on this change.
Change subject: Related to BZ#854151 - Fix disconnect iscsi connections.
......................................................................
Patch Set 1: (3 inline comments)
The fix was already split and merge a long time ago.
This is a related patch that improves debugging, enhance the code and does not introduce
regressions.
....................................................
File vdsm/storage/hsm.py
Line 2030: for conDef in conList:
Line 2031: conInfo = _connectionDict2ConnectionInfo(domType, conDef)
Line 2032: conObj = storageServer.ConnectionFactory.createConnection(conInfo)
Line 2033: try:
Line 2034: conObj.disconnect()
This make this patch more disruptive. We can do this in another patch. In addition, you
are already complaining about a too large patch.
Line 2035: except Exception as err:
Line 2036: self.log.error("Could not disconnect from
storageServer", exc_info=True)
Line 2037: status, _ = self._translateConnectionError(err)
Line 2038: else:
....................................................
File vdsm/storage/storageServer.py
Line 343: sessions = iscsi.iterateIscsiSessions()
Line 344: try:
Line 345: info = iscsi.getSessionInfo(self._lastSessionId)
Line 346: except Exception:
Line 347: self.log.warning("Can't get session info,
self._lastSessionId %s", self._lastSessionId)
Why debug? Expected is that we are able to get the session info. This is irregular, in
spite that we don't raise.
Line 348: else:
Line 349: sessions = chain(info, sessions)
Line 350:
Line 351: self.log.debug("self._target: %s", self._target)
Line 372: try:
Line 373: sid = self.getSessionInfo().id
Line 374: except OSError, e:
Line 375: if e.errno == errno.ENOENT:
Line 376: self.log.warning("Can't get iscsi session id, ENOENT:
%s", e.errno)
Wants the number to be printed.
Line 377: return
Line 378: self.log.warning("Cant get iscsi session id, errno: %s",
e.errno)
Line 379: raise
Line 380:
--
To view, visit
http://gerrit.ovirt.org/8305
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic390cf1a63594a87ee03c010df31f68a432ebff4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>