Antoni Segura Puimedon has posted comments on this change.

Change subject: ifcfg: Do not reconfigure existing underlaying device for VLANs
......................................................................


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

(2 inline comments)

Thanks a lot Hunt, this is a very necessary improvement indeed.

....................................................
File vdsm/netconf/ifcfg.py
Line 82:         self.configWriter.addVlan(vlan.name, bridge=bridge, 
mtu=vlan.mtu,
Line 83:                                   ipaddr=ipaddr, netmask=netmask,
Line 84:                                   gateway=gateway, 
bootproto=bootproto, **opts)
Line 85:         _netinfo = netinfo.NetInfo()
Line 86:         existed_devices = _netinfo.bondings.keys() + 
_netinfo.nics.keys()
s/existed_devices/existing_devices/
Line 87:         if vlan.device.name not in existed_devices:
Line 88:             vlan.device.configure(**opts)
Line 89:         self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto)
Line 90:         ifup(vlan.name, async)


Line 142: 
Line 143:     def removeVlan(self, vlan):
Line 144:         ifdown(vlan.name)
Line 145:         self._removeSourceRoute(vlan)
Line 146:         self.configWriter.removeVlan(vlan.name)
We should check if there is any other user, and if there is none, then do the 
remove.
Line 147: 
Line 148:     def _ifaceDownAndCleanup(self, iface, _netinfo):
Line 149:         """Returns True iff the iface is to be removed."""
Line 150:         ifdown(iface.name)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6a0738c32aefd6eca7fd094ad6f51d8a07353bb2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhun...@gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvall...@redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvov...@redhat.com>
Gerrit-Reviewer: Mark Wu <wu...@linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to