Change in vdsm[master]: Don't down bonds and nics when adding vlan or resizing

asegurap at redhat.com asegurap at redhat.com
Tue Aug 20 22:19:13 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: Don't down bonds and nics when adding vlan or resizing
......................................................................


Patch Set 10:

(2 comments)

....................................................
File vdsm/netconf/ifcfg.py
Line 116:                 ifdown(slave.name)  # nics must be down to join a bond
Line 117:                 self.configApplier.addNic(slave)
Line 118:                 ifup(slave.name)
Line 119: 
Line 120:         if not isIfcfgControlled or not areOptionsApplied:
We could probably skip it. I chose not to skip it because from the moment that the ifcfg configurator (and vdsm by extension) takes control of the device I want the device to just have the configuration that we write for it, so after restart the state will be the same, i.e., no restart surprises.

But yes, if we got the requirement not to down and up pre-existing bonds, we could definitely special case that. For the iproute2 configurator we can re-evaluate it.
Line 121:             ifdown(bond.name)
Line 122:             ifup(bond.name)
Line 123: 
Line 124:     def configureNic(self, nic, **opts):


....................................................
File vdsm/netmodels.py
Line 193: 
Line 194:     def areOptionsApplied(self):
Line 195:         activeOpts = netinfo.bondOpts(self.name)
Line 196:         confOpts = (option.split('=', 1) for option in self.options.split(' '))
Line 197:         return all(value in activeOpts[name] for name, value in confOpts)
Done
Line 198: 
Line 199:     def remove(self):
Line 200:         logging.debug('Removing bond %r', self)
Line 201:         self.configurator.removeBond(self)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id3075a2e65f06416c840c6a98689b77555b22e5d
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap 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: Petr Ĺ ebek <psebek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list