Change in vdsm[master]: Extract helper functions to update nic and bonding's mtu
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Extract helper functions to update nic and bonding's mtu
......................................................................
Extract helper functions to update nic and bonding's mtu
Change-Id: Ic82b1d9a27492619548f1c7ba3fced79ee68a1a8
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/configNetwork.py
M vdsm/netconf/ifcfg.py
2 files changed, 13 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/14871/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index ea749da..2543055 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -376,14 +376,8 @@
elif not bonding:
_removeUnusedNics(network, vlan, bonding, nics, configWriter)
elif not _netinfo.bondingOtherUsers(network, vlan, bonding):
- # update MTU for bond interface and underlying NICs
ifdown(bonding)
- cf = netinfo.NET_CONF_PREF + bonding
- configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
- for nic in nics:
- cf = netinfo.NET_CONF_PREF + nic
- configWriter._updateConfigValue(cf, 'MTU', DEFAULT_MTU, False)
-
+ configWriter.setBondingMtu(bonding, DEFAULT_MTU)
ifup(bonding)
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 0855335..faf8108 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -630,6 +630,16 @@
f.writelines(entries)
f.close()
+ def setIfaceMtu(self, iface, newmtu):
+ cf = netinfo.NET_CONF_PREF + iface
+ self._updateConfigValue(cf, 'MTU', str(newmtu), False)
+
+ def setBondingMtu(self, bonding, newmtu):
+ self.setIfaceMtu(bonding, newmtu)
+ slaves = netinfo.slaves(bonding)
+ for slave in slaves:
+ self.setIfaceMtu(slave, newmtu)
+
def setNewMtu(self, network, bridged, _netinfo=None):
"""
Set new MTU value to network and its interfaces
@@ -679,16 +689,9 @@
# Optimization: if network hasn't custom MTU (currmtu), do nothing
if currmtu and newmtu != currmtu:
if bonding:
- cf = netinfo.NET_CONF_PREF + bonding
- self._updateConfigValue(cf, 'MTU', str(newmtu), newmtu is None)
- slaves = netinfo.slaves(bonding)
- for slave in slaves:
- cf = netinfo.NET_CONF_PREF + slave
- self._updateConfigValue(cf, 'MTU', str(newmtu),
- newmtu is None)
+ self.setBondingMtu(bonding, newmtu)
else:
- cf = netinfo.NET_CONF_PREF + nics[0]
- self._updateConfigValue(cf, 'MTU', str(newmtu), newmtu is None)
+ self.setIfaceMtu(nics[0], newmtu)
def ifdown(iface):
--
To view, visit http://gerrit.ovirt.org/14871
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic82b1d9a27492619548f1c7ba3fced79ee68a1a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
10 years, 11 months
Change in vdsm[master]: Reduce the parameters for addVlan()
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Reduce the parameters for addVlan()
......................................................................
Reduce the parameters for addVlan()
Change-Id: I7d94145d833a109929f4d537b83bf0758dc43b91
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/netconf/ifcfg.py
1 file changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/81/14881/1
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 674814f..622057e 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -90,8 +90,7 @@
bootproto = vlan.ip.bootproto
except AttributeError:
ipaddr = netmask = gateway = bootproto = None
- self.configWriter.addVlan(vlan.tag, vlan.device.name, network=bridge,
- mtu=vlan.mtu, bridged=bridge is not None,
+ self.configWriter.addVlan(vlan.name, bridge=bridge, mtu=vlan.mtu,
ipaddr=ipaddr, netmask=netmask,
gateway=gateway, bootproto=bootproto, **opts)
vlan.device.configure(vlan=vlan.name, **opts)
@@ -471,16 +470,15 @@
self._createConfFile(conf, name, ipaddr, netmask, gateway,
bootproto, mtu, onboot, **kwargs)
- def addVlan(self, vlanId, iface, network, mtu=None, bridged=True,
- ipaddr=None, netmask=None, gateway=None, bootproto=None,
+ def addVlan(self, vlan, bridge=None, mtu=None, ipaddr=None,
+ netmask=None, gateway=None, bootproto=None,
onboot='yes', **kwargs):
""" Create ifcfg-* file with proper fields for VLAN """
- name = '%s.%s' % (pipes.quote(iface), vlanId)
conf = 'VLAN=yes\n'
- if bridged:
- conf += 'BRIDGE=%s\n' % pipes.quote(network)
+ if bridge:
+ conf += 'BRIDGE=%s\n' % pipes.quote(bridge)
- self._createConfFile(conf, name, ipaddr, netmask, gateway,
+ self._createConfFile(conf, vlan, ipaddr, netmask, gateway,
bootproto, mtu, onboot, **kwargs)
def addBonding(self, bonding, bridge=None, bondingOptions=None, mtu=None,
--
To view, visit http://gerrit.ovirt.org/14881
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d94145d833a109929f4d537b83bf0758dc43b91
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
10 years, 11 months
Change in vdsm[master]: Separate adding libvirt network from configuring host networ...
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Separate adding libvirt network from configuring host network.
......................................................................
Separate adding libvirt network from configuring host network.
It makes it simpler to test the network configure functions, and
also make the code a little bit cleaner.
Change-Id: I0bb352ac7c298baa4a3e4a5cba7d23b0b033952f
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M vdsm/configNetwork.py
M vdsm/netconf/ifcfg.py
M vdsm/netmodels.py
3 files changed, 14 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/80/14880/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index ea749da..4ed5166 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -219,7 +219,8 @@
for nic in nics:
if nic not in vlanedIfaces:
ifdown(nic)
- netEnt.configure(network=network, **options)
+ netEnt.configure(**options)
+ configurator.configureLibvirtNetwork(network, bridged, netEnt.name)
def assertBridgeClean(bridge, vlan, bonding, nics):
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 0855335..674814f 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -64,7 +64,7 @@
self.configWriter = None
self._libvirtAdded = set()
- def configureBridge(self, bridge, network=None, **opts):
+ def configureBridge(self, bridge, **opts):
try:
ipaddr = bridge.ip.inet.address
netmask = bridge.ip.inet.netmask
@@ -81,10 +81,8 @@
port.configure(bridge=bridge.name, **opts)
ifup(bridge.name, bootproto == 'dhcp' and
not utils.tobool(opts.get('blockingdhcp')))
- self.configWriter.createLibvirtNetwork(network, True)
- self._libvirtAdded.add(bridge.name)
- def configureVlan(self, vlan, network=None, bridge=None, **opts):
+ def configureVlan(self, vlan, bridge=None, **opts):
try:
ipaddr = vlan.ip.inet.address
netmask = vlan.ip.inet.netmask
@@ -99,12 +97,8 @@
vlan.device.configure(vlan=vlan.name, **opts)
ifup(vlan.name, bootproto == 'dhcp' and
not utils.tobool(opts.get('blockingdhcp')))
- if network:
- self.configWriter.createLibvirtNetwork(network, False, vlan.name)
- self._libvirtAdded.add(network)
- def configureBond(self, bond, network=None, bridge=None, vlan=None,
- **opts):
+ def configureBond(self, bond, bridge=None, vlan=None, **opts):
try:
ipaddr = bond.ip.inet.address
netmask = bond.ip.inet.netmask
@@ -121,12 +115,8 @@
slave.configure(bonding=bond.name, **opts)
ifup(bond.name, bootproto == 'dhcp' and
not utils.tobool(opts.get('blockingdhcp')))
- if network:
- self.configWriter.createLibvirtNetwork(network, False, bond.name)
- self._libvirtAdded.add(network)
- def configureNic(self, nic, network=None, bridge=None, bonding=None,
- vlan=None, **opts):
+ def configureNic(self, nic, bridge=None, bonding=None, vlan=None, **opts):
try:
ipaddr = nic.ip.inet.address
netmask = nic.ip.inet.netmask
@@ -141,9 +131,10 @@
if not bonding:
ifup(nic.name, bootproto == 'dhcp' and
not utils.tobool(opts.get('blockingdhcp')))
- if network:
- self.configWriter.createLibvirtNetwork(network, False, nic.name)
- self._libvirtAdded.add(network)
+
+ def configureLibvirtNetwork(self, network, bridged, iface):
+ self.configWriter.createLibvirtNetwork(network, True, iface)
+ self._libvirtAdded.add(network)
class ConfigWriter(object):
diff --git a/vdsm/netmodels.py b/vdsm/netmodels.py
index ef2d5c0..fa84e60 100644
--- a/vdsm/netmodels.py
+++ b/vdsm/netmodels.py
@@ -38,9 +38,9 @@
self.state = state
self.configurator = configurator
- def configure(self, network=None, bridge=None, bonding=None, vlan=None,
+ def configure(self, bridge=None, bonding=None, vlan=None,
**opts):
- self.configurator.configureNic(self, network=network, bridge=bridge,
+ self.configurator.configureNic(self, bridge=bridge,
bonding=bonding, vlan=vlan, **opts)
def remove(self, network=None, bond=None):
@@ -75,9 +75,8 @@
def __repr__(self):
return '.%s(%r)' % (self.tag, self.device)
- def configure(self, network=None, bridge=None, **opts):
- self.configurator.configureVlan(self, network=network, bridge=bridge,
- **opts)
+ def configure(self, bridge=None, **opts):
+ self.configurator.configureVlan(self, bridge=bridge, **opts)
def remove(self, force=False):
self.configurator.removeVlan(self.name)
--
To view, visit http://gerrit.ovirt.org/14880
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bb352ac7c298baa4a3e4a5cba7d23b0b033952f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
10 years, 11 months
Change in vdsm[master]: vdsm-toolize dummybr and nwfilter
by zhshzhou@linux.vnet.ibm.com
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: vdsm-toolize dummybr and nwfilter
......................................................................
vdsm-toolize dummybr and nwfilter
Move dummybr and nwfilter to vdsm-tool, so that all the init wrappers in
the supported or to-be-supported systems can call them uniformly.
Change-Id: Id32554824cc231f428523dbd34a3fa189b361ae5
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M lib/vdsm/tool/Makefile.am
R lib/vdsm/tool/dummybr.py
R lib/vdsm/tool/nwfilter.py
M vdsm.spec.in
M vdsm/Makefile.am
M vdsm/vdsmd.init.in
M vdsm/vm.py
7 files changed, 19 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/15370/1
diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am
index 0515be6..efb8f4c 100644
--- a/lib/vdsm/tool/Makefile.am
+++ b/lib/vdsm/tool/Makefile.am
@@ -31,6 +31,8 @@
dist_vdsmtool_DATA = \
__init__.py \
+ dummybr.py \
+ nwfilter.py \
passwd.py \
seboolsetup.py \
service.py \
diff --git a/vdsm/dummybr.py b/lib/vdsm/tool/dummybr.py
similarity index 92%
rename from vdsm/dummybr.py
rename to lib/vdsm/tool/dummybr.py
index 0e24cf8..50fc755 100644
--- a/vdsm/dummybr.py
+++ b/lib/vdsm/tool/dummybr.py
@@ -23,6 +23,7 @@
from vdsm.netinfo import DUMMY_BRIDGE
from vdsm import libvirtconnection, utils, constants
+from vdsm.tool import expose
def createEphemeralBridge(bridgeName):
@@ -39,7 +40,15 @@
'''<network><name>%s</name><forward mode='bridge'/><bridge '''
'''name='%s'/></network>''' % (bridgeName, bridgeName))
-if __name__ == '__main__':
+@expose('dummybr')
+def main():
+ '''
+ Defines dummy bridge on libvirt network.
+ '''
if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE):
createEphemeralBridge(DUMMY_BRIDGE)
addBridgeToLibvirt(DUMMY_BRIDGE)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/vdsm/nwfilter.py b/lib/vdsm/tool/nwfilter.py
similarity index 97%
rename from vdsm/nwfilter.py
rename to lib/vdsm/tool/nwfilter.py
index 7fcff29..85d9dff 100755
--- a/vdsm/nwfilter.py
+++ b/lib/vdsm/tool/nwfilter.py
@@ -24,8 +24,10 @@
import libvirt
from vdsm import libvirtconnection
+from vdsm.tool import expose
+@expose('nwfilter')
def main():
"""
Defines network filters on libvirt
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 7f79e23..c365900 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -786,8 +786,6 @@
%{_datadir}/%{vdsm_name}/vdsm-store-net-config
%{_datadir}/%{vdsm_name}/vm.py*
%{_datadir}/%{vdsm_name}/zombieReaper.py*
-%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/dummybr.py*
-%attr (755,vdsm,kvm) %{_datadir}/%{vdsm_name}/nwfilter.py*
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
%config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf
@@ -975,6 +973,8 @@
%else
%{python_sitearch}/%{vdsm_name}/tool/load_needed_modules.py*
%endif
+%{python_sitearch}/%{vdsm_name}/tool/dummybr.py*
+%{python_sitearch}/%{vdsm_name}/tool/nwfilter.py*
%{python_sitearch}/%{vdsm_name}/tool/passwd.py*
%{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py*
%{python_sitearch}/%{vdsm_name}/tool/service.py*
diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
index c101335..c528b41 100644
--- a/vdsm/Makefile.am
+++ b/vdsm/Makefile.am
@@ -32,7 +32,6 @@
configNetwork.py \
debugPluginClient.py \
dmidecodeUtil.py \
- dummybr.py \
guestIF.py \
hooking.py \
hooks.py \
@@ -45,7 +44,6 @@
momIF.py \
neterrors.py \
netmodels.py \
- nwfilter.py \
parted_utils.py \
sampling.py \
supervdsm.py \
diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
index 72a48c3..7a6d2db 100755
--- a/vdsm/vdsmd.init.in
+++ b/vdsm/vdsmd.init.in
@@ -477,7 +477,7 @@
return $ret_val
fi
- python @VDSMDIR(a)/nwfilter.pyc
+ vdsm-tool nwfilter
ret_val=$?
if [ $ret_val -ne 0 ]
then
@@ -485,7 +485,7 @@
return $ret_val
fi
- python @VDSMDIR(a)/dummybr.pyc
+ vdsm-tool dummybr
ret_val=$?
if [ $ret_val -ne 0 ]
then
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 76e3383..67328d2 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -43,9 +43,9 @@
from vdsm import vdscli
from vdsm.config import config
from vdsm.define import ERROR, NORMAL, doneCode, errCode
+from vdsm.netinfo import DUMMY_BRIDGE
# local imports
-from dummybr import DUMMY_BRIDGE
from logUtils import SimpleLogAdapter
import caps
import guestIF
--
To view, visit http://gerrit.ovirt.org/15370
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id32554824cc231f428523dbd34a3fa189b361ae5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
10 years, 11 months
Change in vdsm[master]: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmd...
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine
......................................................................
Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine
Change-Id: I74b898a6398a72608d7933009644703aa3f8d831
Signed-off-by: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/libvirtvmTests.py
1 file changed, 95 insertions(+), 1 deletion(-)
Approvals:
Vinzenz Feenstra: Looks good to me, but someone else must approve
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/14111
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I74b898a6398a72608d7933009644703aa3f8d831
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 11 months
Change in vdsm[master]: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmd...
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine
......................................................................
Patch Set 11: Looks good to me, approved
I did not quite like the separation to another module, it seemed like pointless complexity to me. But you have a point about this file's size. I suggest that either Maciej or I fix this in a follow-up patch.
Thanks!
--
To view, visit http://gerrit.ovirt.org/14111
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I74b898a6398a72608d7933009644703aa3f8d831
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 11 months
Change in vdsm[master]: Improve the checking of mulitple direct users on an interfac...
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: Improve the checking of mulitple direct users on an interface.
......................................................................
Improve the checking of mulitple direct users on an interface.
Change-Id: I1e8bc4d8ee8709f72a5746edc2d61f320ef1a2ab
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M lib/vdsm/netinfo.py
M vdsm/configNetwork.py
2 files changed, 14 insertions(+), 33 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/14872/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 8c06c2a..1e406da 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -606,32 +606,13 @@
users.add(v)
return users
- def nicOtherUsers(self, bridge, vlan, bonding, nic):
+ def ifaceHasMultiUsers(self, iface):
"""
- Returns a list of interfaces using a nic,
- other than the specified one.
+ Checks if the interface has multiple direct users.
+ The two possible cases of mulitple users are multiple bridged or
+ bridgeless networks via vlans and one direct bridgeless network
+ with multiple network users via vlan.
+ The interface can't have multiple direct users if it's enslaved
+ to bonding or bridge directly.
"""
- if bonding:
- owner = bonding
- elif vlan:
- owner = nic + '.' + vlan
- else:
- owner = bridge
- users = self.ifaceUsers(nic)
- if bonding:
- users.update(self.bondingOtherUsers(bridge, vlan, bonding))
- users.discard(owner)
- return users
-
- def bondingOtherUsers(self, bridge, vlan, bonding):
- """
- Return a list of nics/interfaces using a bonding,
- other than the specified one.
- """
- if vlan:
- owner = bonding + '.' + vlan
- else:
- owner = bridge
- users = self.ifaceUsers(bonding)
- users.discard(owner)
- return users
+ return len(list(self.getNetworksAndVlansForIface(iface))) > 1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 2543055..ef6c66f 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -270,10 +270,10 @@
print "Bondings:", _netinfo.bondings.keys()
-def _removeUnusedNics(network, vlan, bonding, nics, configWriter):
+def _removeUnusedNics(nics, configWriter):
_netinfo = netinfo.NetInfo()
for nic in nics:
- if not _netinfo.nicOtherUsers(network, vlan, bonding, nic):
+ if not _netinfo.ifaceHasMultiUsers(nic):
ifdown(nic)
configWriter.removeNic(nic)
ifup(nic)
@@ -368,14 +368,14 @@
# The (relatively) new setupNetwork verb allows to remove a network
# defined on top of an bonding device without break the bond itself.
if implicitBonding:
- if bonding and not _netinfo.bondingOtherUsers(network, vlan, bonding):
+ if bonding and not _netinfo.ifaceHasMultiUsers(bonding):
ifdown(bonding)
configWriter.removeBonding(bonding)
- _removeUnusedNics(network, vlan, bonding, nics, configWriter)
+ _removeUnusedNics(nics, configWriter)
elif not bonding:
- _removeUnusedNics(network, vlan, bonding, nics, configWriter)
- elif not _netinfo.bondingOtherUsers(network, vlan, bonding):
+ _removeUnusedNics(nics, configWriter)
+ elif not _netinfo.ifaceHasMultiUsers(bonding):
ifdown(bonding)
configWriter.setBondingMtu(bonding, DEFAULT_MTU)
ifup(bonding)
--
To view, visit http://gerrit.ovirt.org/14872
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e8bc4d8ee8709f72a5746edc2d61f320ef1a2ab
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
10 years, 11 months
Change in vdsm[master]: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmd...
by Vinzenz Feenstra
Vinzenz Feenstra has posted comments on this change.
Change subject: Added unit test libvirtvmTests.py:TestLibvirtvm.testBuildCmdLine
......................................................................
Patch Set 11: Looks good to me, but someone else must approve
Well I am not sure why we have to have the conf and the XML in the code and I don't really like it because of its size, but otherwise it looks good to me
--
To view, visit http://gerrit.ovirt.org/14111
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I74b898a6398a72608d7933009644703aa3f8d831
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Maciej Lichon <maciej.lichon.wroclaw(a)gmail.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 11 months
Change in vdsm[master]: mom: add mom balloon functional tests for running vms
by wudxw@linux.vnet.ibm.com
Mark Wu has posted comments on this change.
Change subject: mom: add mom balloon functional tests for running vms
......................................................................
Patch Set 6: Looks good to me, but someone else must approve
--
To view, visit http://gerrit.ovirt.org/13156
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I922568233dc769d83e2fdffe1c24439d13d03d7e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Mei Liu <liumbj(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 11 months