Change in vdsm[master]: BZ#840594 Fix netinfo when libvirt bridge does not exist.

ilvovsky at redhat.com ilvovsky at redhat.com
Mon Aug 13 10:27:47 UTC 2012


Igor Lvovsky has posted comments on this change.

Change subject: BZ#840594 Fix netinfo when libvirt bridge does not exist.
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File vdsm/netinfo.py
Line 253:                 # added d['networks']
Line 254:                 if e == errno.ENOENT:
Line 255:                     continue
Line 256:                 else:
Line 257:                     raise
hmmm, I am not really like it.
what about just check whether this bridge exists:
   if not devname in bridges():
        continue
Line 258:         else:
Line 259:             devname = nets[netname]['iface']
Line 260:             d['networks'][netname] = {}
Line 261: 


Line 269:                     'bridged': nets[netname]['bridged'],
Line 270:                     'addr': getaddr(devname),
Line 271:                     'netmask': getnetmask(devname),
Line 272:                     'gateway': routes.get(devname, '0.0.0.0'),
Line 273:                     'mtu': getMtu(devname), })
Actually, you will fail here too for such situation
Line 274: 
Line 275:     d['bridges'] = dict([(bridge, {
Line 276:                               'ports': ports(bridge),
Line 277:                               'stp': bridge_stp_state(bridge),


--
To view, visit http://gerrit.ovirt.org/7127
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2538a8ce2fafd8efed834b87b20a63d058afd96b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>


More information about the vdsm-patches mailing list