Change in vdsm[master]: Skip netdev probe from sessions missing iscsi sysfs (i.e. us...

danken at redhat.com danken at redhat.com
Thu Mar 5 14:04:37 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: Skip netdev probe from sessions missing iscsi sysfs (i.e. using hardware iSCSI)
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/38354/3/vdsm/storage/iscsi.py
File vdsm/storage/iscsi.py:

Line 143:     for fname in (targetname, iface, tpgt, user, passwd, paddr, pport, netdev):
Line 144:         try:
Line 145:             with open(fname, "r") as f:
Line 146:                 res.append(f.read().strip())
Line 147:         except (OSError, IOError, TypeError):
netdev=None is not a surprise here. We should not just swallow all TypeError to avoid it.

Please skip opening the filename if it is none to be None.

if fname is None:
  res.append("")
  continue
Line 148:             res.append("")
Line 149: 
Line 150:     iqn, iface, tpgt, username, password, ip, port, netdev = res
Line 151:     port = int(port)


-- 
To view, visit https://gerrit.ovirt.org/38354
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie6f273fddff2235f15197c6689de5e6374fda6f0
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list