Change in vdsm[master]: ifcfg: Do not reconfigure existing underlaying device for VL...

mhuntxu at gmail.com mhuntxu at gmail.com
Mon Jul 8 07:57:08 UTC 2013


Hunt Xu has posted comments on this change.

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


Patch Set 2: (2 inline comments)

....................................................
File vdsm/netconf/ifcfg.py
Line 83:                                   ipaddr=ipaddr, netmask=netmask,
Line 84:                                   gateway=gateway, bootproto=bootproto, **opts)
Line 85:         _netinfo = netinfo.NetInfo()
Line 86:         existing_devices = _netinfo.bondings.keys() + _netinfo.nics.keys()
Line 87:         if vlan.device.name not in existing_devices:
For NICs, we don't really need to configure them at all. Because for example ifcfg-ethX.Y doesn't really depend on ifcfg-ethX.
Line 88:             vlan.device.configure(**opts)
Line 89:         self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto)
Line 90:         ifup(vlan.name, async)
Line 91: 


Line 83:                                   ipaddr=ipaddr, netmask=netmask,
Line 84:                                   gateway=gateway, bootproto=bootproto, **opts)
Line 85:         _netinfo = netinfo.NetInfo()
Line 86:         existing_devices = _netinfo.bondings.keys() + _netinfo.nics.keys()
Line 87:         if vlan.device.name not in existing_devices:
I have exactly the same concern about this. My original thought of this is to skip configurations of all those existing devices. I then didn't realize that changes of bondings could happen at the same time.

One thing I want to make sure is that whether we should allow reconfigure bondings which are already used by others. For example, if we added VlanA(bond1(eth0, eth1)), can we then add VlanB(bond1(eth1, eth2)). If yes, then we'd better always reconfigure underlaying bondings. If no, then for those bondings not used, we reconfigure them.
Line 88:             vlan.device.configure(**opts)
Line 89:         self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto)
Line 90:         ifup(vlan.name, async)
Line 91: 


-- 
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: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky 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