Antoni Segura Puimedon has posted comments on this change.

Change subject: Don't crash on libvirt network re-definition.
......................................................................


Patch Set 5: (4 inline comments)

Thanks for the review Dan!

....................................................
File vdsm/configNetwork.py
Line 406:         ports = []
Line 407:         for file_path in glob.iglob(netinfo.NET_CONF_PREF + '*'):
Line 408:             with open(file_path, 'r') as conf_file:
Line 409:                 for line in conf_file:
Line 410:                     if line.startswith('BRIDGE=' + 'network'):
It was tested :P I was in fact hunting for a bug where a port was not removed. 
Thanks for spotting it!
Line 411:                         ports.append(file_path[file_path.rindex('-') 
+ 1:])
Line 412:         return ports
Line 413: 
Line 414:     def writeConfFile(self, fileName, configuration):


Line 651:         currmtu = None
Line 652:         if bridged:
Line 653:             try:
Line 654:                 currmtu = int(netinfo.getMtu(network))
Line 655:             except IOError:
Done
Line 656:                 currmtu = None
Line 657: 
Line 658:         nics, delvlan, bonding = \
Line 659:             _netinfo.getNicsVlanAndBondingForNetwork(network)


Line 652:         if bridged:
Line 653:             try:
Line 654:                 currmtu = int(netinfo.getMtu(network))
Line 655:             except IOError:
Line 656:                 currmtu = None
Sure, I'll change it to a pass.
Line 657: 
Line 658:         nics, delvlan, bonding = \
Line 659:             _netinfo.getNicsVlanAndBondingForNetwork(network)
Line 660:         if delvlan is None:


Line 1376:                     # returned by libvirt, it means that we are 
dealing with
Line 1377:                     # a broken network.
Line 1378:                     logger.debug('Removing broken network %r' % 
network)
Line 1379:                     # Since delNetwork gets the information from the 
"living"
Line 1380:                     # network entities via netinfo instantiation, 
here we will
alright, I'll do that. It was more a question of not having an alternative name 
for the method besides delBrokenNetwork.
Line 1381:                     # add some information about the non-living 
network
Line 1382:                     # entities so they can be removed.
Line 1383:                     _customNetinfo = netinfo.NetInfo()
Line 1384:                     _customNetinfo.networks[network] = 
libvirt_nets[network]


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I76d95e20b7aa99280e604abdb1663c6c5c7dd32e
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to