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

mhuntxu at gmail.com mhuntxu at gmail.com
Fri Jul 5 15:53:55 UTC 2013


Hunt Xu has posted comments on this change.

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


Patch Set 2: (1 inline comment)

....................................................
File vdsm/netconf/ifcfg.py
Line 140:         if bridge.port:
Line 141:             bridge.port.remove()
Line 142: 
Line 143:     def removeVlan(self, vlan):
Line 144:         ifdown(vlan.name)
I think I've misunderstood your previous comment that I thought you suggested me to check the user of the vlan.

Let me try to clarify this. With your example, do you mean that vdsm doesn't allow the existence of standalone bonds which are not used by any networks/vlans, so we should remove the vlan.device as long as it is not used. Is that right?

However, currently vdsm seems to allow such a standalone bond by calling setupNetworks() with only bonding-related options.

So the problem is that a bond device might be pre-created or created during setting up a new network. And we should decide whether to leave it there or to break it when we find that it is not used by anyone.

For the case that vlan.device is netmodels.Nic, the situation is analogous. The creation of BridgeA(vlanA(eth0)) and BridgeB(vlanB(eth0)) doesn't actually touch the configuration file of eth0. Not calling vlan.device.remove() leaves the device in the 'up' status. Calling vlan.device.remove() would bring it down and remove its configuration file which is fine if no one is using the device.

I'm just OK with either of the two approaches. What do you think?
Line 145:         self._removeSourceRoute(vlan)
Line 146:         self.configWriter.removeVlan(vlan.name)
Line 147: 
Line 148:     def _ifaceDownAndCleanup(self, iface, _netinfo):


-- 
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