Change in vdsm[master]: Multiple Gateways[1/2]: add sourceRouting module

danken at redhat.com danken at redhat.com
Wed Jun 26 09:58:47 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Multiple Gateways[1/2]: add sourceRouting module
......................................................................


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

(4 inline comments)

....................................................
File vdsm/sourceRoute.py
Line 85: 
Line 86:     def _isLibvirtInterfaceFallback(self):
Line 87:         """
Line 88:         Checks whether the device belongs to libvirt when libvirt is not
Line 89:         yet running. To do so, it must check if there is an autostart
(I'm saying that this should be part of the docstring)
Line 90:         network that uses the device.
Line 91:         """
Line 92:         bridged_name = "bridge name='%s'" % self.device
Line 93:         bridgeless_name = "interface dev='%s'" % self.device


Line 92:         bridged_name = "bridge name='%s'" % self.device
Line 93:         bridgeless_name = "interface dev='%s'" % self.device
Line 94:         for filename in iglob('/etc/libvirt/qemu/networks/autostart/'
Line 95:                               'vdsm-*'):
Line 96:             with open(filename, 'r') as xml_file:
this is such an ugly hack... we keep it with this free-text lookup
Line 97:                 xml_content = xml_file.read()
Line 98:                 if bridged_name in xml_content or \
Line 99:                         bridgeless_name in xml_content:
Line 100:                     return True


Line 114:     def remove(self):
Line 115:         self.configurator.removeSourceRoute(None, None, self.device)
Line 116: 
Line 117: 
Line 118: class DynamicSourceRoute(StaticSourceRoute):
no, I can live with this.
Line 119:     @staticmethod
Line 120:     def _getRoutes(table, device):
Line 121:         routes = []
Line 122:         for entry in routeShowTable(table):


Line 214:         configurator = Iproute2()
Line 215:         sourceRoute = DynamicSourceRoute(args.device, configurator)
Line 216: 
Line 217:     if not sourceRoute.isLibvirtInterface():
Line 218:         logging.error("interface %s is not a libvirt interface" %
indeed, imo it should not be marked as an error.
Line 219:                       sourceRoute.device)
Line 220:         return
Line 221: 
Line 222:     if args.action == 'configure':


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0224d896724b9cdc44215e92f0da0be71fd19038
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list