Change in vdsm[master]: vm: Set numatune and guest numa topology
by alitke@redhat.com
Adam Litke has posted comments on this change.
Change subject: vm: Set numatune and guest numa topology
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
Thanks for the patch! On the next submission I hope you will include the changes to vdsmapi-schema.json so we can discuss the API a bit more thoroughly.
http://gerrit.ovirt.org/#/c/25254/1/vdsm/vm.py
File vdsm/vm.py:
Line 1136: numa = XMLElement('numa')
Line 1137: vmNumaTopology = self.conf.get('vmNumaTopology')
Line 1138: for vmCell in vmNumaTopology:
Line 1139: numa.appendChildWithArgs('cell',
Line 1140: cpus=vmCell['cpus'].replace(";", ","),
Something seems strange here. If you want commas, why not make them part of the format of vmNumaTopology to begin with? Maybe you need to model this a bit differently in the API.
Line 1141: memory=vmCell['memory'])
Line 1142: cpu.appendChild(numa)
Line 1143:
Line 1144: self.dom.appendChild(cpu)
Line 1157: if ('nodeset' in numaMemory.keys()):
Line 1158: mode = 'strict'
Line 1159: if ('mode' in numaMemory.keys()):
Line 1160: mode = numaMemory['mode']
Line 1161: nodeset = numaMemory['nodeset'].replace(';', ',')
same comment about replacing ; with ,
Line 1162: numatune = XMLElement('numatune')
Line 1163: numatune.appendChildWithArgs('memory', mode=mode,
Line 1164: nodeset=nodeset)
Line 1165: self.dom.appendChild(numatune)
--
To view, visit http://gerrit.ovirt.org/25254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88ec56047809b03449a788ead0b97f9ed876712d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 2 months
Change in vdsm[ovirt-3.4]: Use same constants for configuring and check configure of sa...
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Use same constants for configuring and check configure of sanlock
......................................................................
Use same constants for configuring and check configure of sanlock
Both DISKIMAGE_GROUP and QEMU_PROCESS_GROUP points to 'qemu'. It's
confusing to use both one for configure and one for verification.
The patch uses the same constants and check also if VDSM_GROUP is also
set properly as required by sanlock process.
Change-Id: I424fdf30e0c5377846976505633d674f21ee7438
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M lib/vdsm/tool/configurator.py
1 file changed, 12 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/25162/1
diff --git a/lib/vdsm/tool/configurator.py b/lib/vdsm/tool/configurator.py
index b885d81..37fd416 100644
--- a/lib/vdsm/tool/configurator.py
+++ b/lib/vdsm/tool/configurator.py
@@ -24,8 +24,7 @@
from .. import utils
from . import service, expose
-from ..constants import P_VDSM_EXEC, DISKIMAGE_GROUP
-from ..constants import QEMU_PROCESS_GROUP, VDSM_GROUP
+from ..constants import P_VDSM_EXEC, QEMU_PROCESS_GROUP, VDSM_GROUP
class _ModuleConfigure(object):
@@ -108,6 +107,9 @@
class SanlockModuleConfigure(_ModuleConfigure):
+
+ SANLOCK_GROUPS = (QEMU_PROCESS_GROUP, VDSM_GROUP)
+
def __init__(self):
super(SanlockModuleConfigure, self).__init__()
@@ -129,7 +131,7 @@
'/usr/sbin/usermod',
'-a',
'-G',
- '%s,%s' % (QEMU_PROCESS_GROUP, VDSM_GROUP),
+ ','.join(self.SANLOCK_GROUPS),
'sanlock'
),
raw=True,
@@ -159,7 +161,13 @@
break
else:
raise RuntimeError("Unable to find sanlock service groups")
- configured = grp.getgrnam(DISKIMAGE_GROUP)[2] in groups
+
+ is_sanlock_groups_set = True
+ for g in self.SANLOCK_GROUPS:
+ if grp.getgrnam(g)[2] not in groups:
+ is_sanlock_groups_set = False
+ configured = is_sanlock_groups_set
+
except IOError as e:
if e.errno == os.errno.ENOENT:
sys.stdout.write("sanlock service is not running\n")
--
To view, visit http://gerrit.ovirt.org/25162
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I424fdf30e0c5377846976505633d674f21ee7438
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: Adding vdsm.conf.example to rhel build
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Adding vdsm.conf.example to rhel build
......................................................................
Adding vdsm.conf.example to rhel build
The file was not installed to avoid putting it on RHEV-H installation,
which should be small as possible. The sample file was requested by users
and should be located for reference after manual installation (without
host-deploy process. If host installed by host-deploy process, this file will
be overrided by the required config)
Change-Id: I2606c571cd6de06eee811bbd340a790f98d11907
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1023941
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 0 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/24945/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 71a54dd..25069e0 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -667,11 +667,8 @@
install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
%endif
-%if !0%{?rhel}
-# Install the configuration sample
install -Dm 0644 lib/vdsm/vdsm.conf.sample \
%{buildroot}%{_sysconfdir}/%{vdsm_name}/vdsm.conf
-%endif
# Install the polkit for libvirt
%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
--
To view, visit http://gerrit.ovirt.org/24945
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2606c571cd6de06eee811bbd340a790f98d11907
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: logging: Stop the fileConfig from disabling existing logs
by dkuznets@redhat.com
Dima Kuznetsov has uploaded a new change for review.
Change subject: logging: Stop the fileConfig from disabling existing logs
......................................................................
logging: Stop the fileConfig from disabling existing logs
Unless disable_existsing_loggers is passed as true, logging checks
the pre-existing logs and disables any that are not mentioned in the
configuration file, this causes various logs to be not visible.
Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060510
Signed-off-by: Dima Kuznetsov <dkuznets(a)redhat.com>
---
M vdsm/vdsm
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/85/25185/1
diff --git a/vdsm/vdsm b/vdsm/vdsm
index d91704a..1f72755 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -79,7 +79,7 @@
def run(pidfile=None):
- lconfig.fileConfig(loggerConfFile)
+ lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False)
logging.addLevelName(5, 'TRACE')
logging.TRACE = 5 # impolite but helpful
--
To view, visit http://gerrit.ovirt.org/25185
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: vm: Set numatune and guest numa topology
by Vinzenz Feenstra
Vinzenz Feenstra has posted comments on this change.
Change subject: vm: Set numatune and guest numa topology
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
Please update vdsm_api/vdsmapi-schema.json if you modify the API
Also I don't like the inconsistency of 'vmNumaTopology' vs 'numaMemory'
http://gerrit.ovirt.org/#/c/25254/1/vdsm/vm.py
File vdsm/vm.py:
Line 1157:
unnecessary paranthesis
Line 1155: if 'numaMemory' in self.conf:
Line 1156: numaMemory = self.conf.get('numaMemory')
Line 1157: if ('nodeset' in numaMemory.keys()):
Line 1158: mode = 'strict'
Line 1159: if ('mode' in numaMemory.keys()):
same here
But better would be:
mode = numaMemory.get('mode', 'strict')
Which defaults to strict when mode not present
Line 1160: mode = numaMemory['mode']
Line 1161: nodeset = numaMemory['nodeset'].replace(';', ',')
Line 1162: numatune = XMLElement('numatune')
Line 1163: numatune.appendChildWithArgs('memory', mode=mode,
--
To view, visit http://gerrit.ovirt.org/25254
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88ec56047809b03449a788ead0b97f9ed876712d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 2 months
Change in vdsm[master]: unified pers: fix restoration when moving from ifcfg pers
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: unified pers: fix restoration when moving from ifcfg pers
......................................................................
unified pers: fix restoration when moving from ifcfg pers
Up until now we were only flushing the persistence of the
configurator currently set up. This had the problem that when
switching between configurators and persistence models, old
persistence remainders could be left over.
Bug-Url https://bugzilla.redhat.com/1064530
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
Change-Id: I584b3b2ee953b508da23874c0adc79fe59e06856
---
M vdsm/vdsm-restore-net-config
1 file changed, 25 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/25063/1
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index fc2308b..8f758fd 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -1,6 +1,6 @@
#! /usr/bin/python
#
-# Copyright 2011-2012 Red Hat, Inc.
+# Copyright 2011-2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,14 +18,19 @@
#
# Refer to the README and COPYING files for full details of the license
#
-
import logging
import logging.config
-from netconf import ifcfg
from vdsm.config import config
+
+# Ifcfg persistence restoration
+from netconf import ifcfg
+
+# Unified persistence restoration
from vdsm.netconfpersistence import RunningConfig, PersistentConfig
-from configNetwork import setupNetworks, ConfiguratorClass
+from configNetwork import setupNetworks
+import pkgutil
+import netconf
def ifcfg_restoration():
@@ -38,7 +43,6 @@
Builds a setupNetworks command from the persistent configuration to set it
as running configuration.
"""
- configurator = ConfiguratorClass()
runningConfig = RunningConfig()
removeNetworks = {}
removeBonds = {}
@@ -51,7 +55,11 @@
setupNetworks(removeNetworks, removeBonds, connectivityCheck=False,
_inRollback=True)
- configurator.flush()
+ # Flush vdsm configurations left-overs from any configurator on the system
+ # so that changes of configurator and persistence system are smooth.
+ for configurator_cls in _get_all_configurators():
+ configurator_cls().flush()
+
persistentConfig = PersistentConfig()
nets = persistentConfig.networks
bonds = persistentConfig.bonds
@@ -60,6 +68,17 @@
setupNetworks(nets, bonds, connectivityCheck=False, _inRollback=True)
+def _get_all_configurators():
+ """Returns the class objects of all the configurators in the netconf pkg"""
+ prefix = netconf.__name__ + '.'
+ for importer, moduleName, isPackage in pkgutil.iter_modules(
+ netconf.__path__, prefix):
+ __import__(moduleName, fromlist="_")
+
+ for cls in netconf.Configurator.__subclasses__():
+ yield cls
+
+
def restore():
if config.get('vars', 'net_persistence') == 'unified':
unified_restoration()
--
To view, visit http://gerrit.ovirt.org/25063
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I584b3b2ee953b508da23874c0adc79fe59e06856
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: caps: Collect numa information
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: caps: Collect numa information
......................................................................
Patch Set 8:
No Builds Executed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7411/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6618/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7520/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
--
To view, visit http://gerrit.ovirt.org/23703
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa <gustavo.pedrosa(a)eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianconi(a)eldorado.org.br>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.lima(a)eldorado.org.br>
Gerrit-Reviewer: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 2 months
Change in vdsm[master]: netinfo: bootproto4 is now 'dhcp'/'none' instead of a boolean
by osvoboda@redhat.com
Ondřej Svoboda has uploaded a new change for review.
Change subject: netinfo: bootproto4 is now 'dhcp'/'none' instead of a boolean
......................................................................
netinfo: bootproto4 is now 'dhcp'/'none' instead of a boolean
testSetupNetworksAddDelDhcp verifies the new property.
Change-Id: Iaef31f93da978a5793fceae28763ceafedb8d3b6
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M lib/vdsm/netinfo.py
M tests/functional/networkTests.py
2 files changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/70/25170/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index d7eccc6..510ac85 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -500,9 +500,11 @@
Raises a KeyError if the iface does not exist.'''
data = {}
try:
+ bootproto4 = 'dhcp' if iface in dhcp4 else 'none'
if bridged:
data.update({'ports': ports(iface), 'stp': bridge_stp_state(iface),
'cfg': getIfaceCfg(iface)})
+ data['cfg']['BOOTPROTO'] = bootproto4
else:
# ovirt-engine-3.1 expects to see the "interface" attribute iff the
# network is bridgeless. Please remove the attribute and this
@@ -512,7 +514,7 @@
ipv4addr, ipv4netmask, ipv6addrs = getIpInfo(iface, ipaddrs)
data.update({'iface': iface, 'bridged': bridged,
'addr': ipv4addr, 'netmask': ipv4netmask,
- 'bootproto4': iface in dhcp4,
+ 'bootproto4': bootproto4,
'gateway': getgateway(gateways, iface),
'ipv6addrs': ipv6addrs,
'ipv6gateway': ipv6routes.get(iface, '::'),
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 695a29f..ec4fb1c 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -1661,12 +1661,15 @@
veth.setLinkUp(left)
with dnsmasqDhcp(left):
network = {NETWORK_NAME: {'nic': right, 'bridged': False,
- 'bootprot': 'dhcp'}}
+ 'bootproto': 'dhcp'}}
status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME)
+ net = self.vdsm_net.netinfo.networks[NETWORK_NAME]
+ self.assertEqual(net['bootproto4'], 'dhcp')
+
network = {NETWORK_NAME: {'remove': True}}
status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
--
To view, visit http://gerrit.ovirt.org/25170
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaef31f93da978a5793fceae28763ceafedb8d3b6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: netinfo: Add shorthand NetInfo.bridges for consistency
by osvoboda@redhat.com
Ondřej Svoboda has uploaded a new change for review.
Change subject: netinfo: Add shorthand NetInfo.bridges for consistency
......................................................................
netinfo: Add shorthand NetInfo.bridges for consistency
Change-Id: Ibf14be0a4db0678b4653512accd48b5ee9a43e1d
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M lib/vdsm/netinfo.py
M tests/configNetworkTests.py
M tests/netmodelsTests.py
3 files changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/25212/1
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 8c21392..9a9c29a 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -747,6 +747,7 @@
self.vlans = _netinfo['vlans']
self.nics = _netinfo['nics']
self.bondings = _netinfo['bondings']
+ self.bridges = _netinfo['bridges']
def updateDevices(self):
"""Updates the object device information while keeping the cached
@@ -756,6 +757,7 @@
self.vlans = _netinfo['vlans']
self.nics = _netinfo['nics']
self.bondings = _netinfo['bondings']
+ self.bridges = _netinfo['bridges']
def getNetworksAndVlansForIface(self, iface):
""" Returns tuples of (bridge/network, vlan) connected to nic/bond """
diff --git a/tests/configNetworkTests.py b/tests/configNetworkTests.py
index a72fe96..8e6f37c 100644
--- a/tests/configNetworkTests.py
+++ b/tests/configNetworkTests.py
@@ -88,6 +88,7 @@
},
'nics': ['eth0', 'eth1', 'eth2', 'eth3', 'eth4', 'eth5', 'eth6',
'eth7', 'eth8', 'eth9', 'eth10'],
+ 'bridges': {},
'bondings': {'bond00': {'slaves': ['eth5', 'eth6']}}
}
diff --git a/tests/netmodelsTests.py b/tests/netmodelsTests.py
index 6181a9e..033b8d85 100644
--- a/tests/netmodelsTests.py
+++ b/tests/netmodelsTests.py
@@ -138,7 +138,7 @@
def testTextualRepr(self):
_netinfo = {'networks': {}, 'vlans': {},
'nics': ['testnic1', 'testnic2'],
- 'bondings': {}}
+ 'bondings': {}, 'bridges': {}}
fakeInfo = netinfo.NetInfo(_netinfo)
nic1 = Nic('testnic1', None, _netinfo=fakeInfo)
nic2 = Nic('testnic2', None, _netinfo=fakeInfo)
--
To view, visit http://gerrit.ovirt.org/25212
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf14be0a4db0678b4653512accd48b5ee9a43e1d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
10 years, 2 months
Change in vdsm[master]: ifcfg: stop leaving leftover bridges when removing bonded ne...
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: ifcfg: stop leaving leftover bridges when removing bonded networks
......................................................................
ifcfg: stop leaving leftover bridges when removing bonded networks
When having a network bridged non-vlanned bonded network, removing
the network while intending to remove the bond would remove the
network bridge and then create it again.
This patch fixes it by removing the 'BRIDGE' entry from the bond
before ifuppin it up again.
Change-Id: I3de692c7f089d6a9f404c3a2f6f568c12d8a985d
Bug-Url: https://bugzilla.redhat.com/1071398
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm/netconf/ifcfg.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/25203/1
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index ee69c3d..835aae4 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -189,6 +189,9 @@
else:
self.configApplier.setBondingMtu(bonding.name,
netinfo.DEFAULT_MTU)
+ if bonding.bridge is not None:
+ self.configApplier._updateConfigValue(
+ netinfo.NET_CONF_PREF + bonding.name, 'BRIDGE', None)
ifup(bonding.name)
else:
set_mtu = self._setNewMtu(
@@ -739,7 +742,8 @@
entries = [line for line in f.readlines()
if not line.startswith(entry + '=')]
- entries.append('\n' + entry + '=' + value)
+ if value is not None:
+ entries.append('\n' + entry + '=' + value)
self._backup(conffile)
with open(conffile, 'w') as f:
f.writelines(entries)
--
To view, visit http://gerrit.ovirt.org/25203
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3de692c7f089d6a9f404c3a2f6f568c12d8a985d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
10 years, 2 months