Change in vdsm[master]: Management network is now kept in main routing table

amuller at redhat.com amuller at redhat.com
Thu Aug 1 13:07:29 UTC 2013


Assaf Muller has uploaded a new change for review.

Change subject: Management network is now kept in main routing table
......................................................................

Management network is now kept in main routing table

Only the management network should add its default route
to the main routing table. Using the ifcfg configurator this is
accomplished by propogating DEFROUTE='yes'/'no' (According to
the network name) from addNetwork down to where we write ifcfg
files. This means that all devices will place DEFROUTE, regardless
if they have an ip configuration or not. For example: A bridge
over a nic will place the DEFROUTE line in both the bridge ifcfg
and the nic ifcfg. With how ifup-eth and ifdown-eth are implemented
this is harmless for devices with no ip configuration.

Change-Id: I55c50269dd3d52fd058951200282c925a7014aca
Signed-off-by: Assaf Muller <amuller at redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/17575/1

diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index fdb0b8f..8832886 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -147,6 +147,10 @@
                                      'has networks' % (iface))
 
 
+def isManagementNetwork(network):
+    return network in ('ovirtmgmt', 'rhevm')
+
+
 def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None,
                netmask=None, prefix=None, mtu=None, gateway=None, force=False,
                configurator=None, bondingOptions=None, bridged=True,
@@ -182,6 +186,9 @@
             for nic in nics:
                 _validateInterNetworkCompatibility(_netinfo, vlan, nic,
                                                    bridged)
+
+    options['DEFROUTE'] = 'yes' if isManagementNetwork(network) else 'no'
+
     logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s,"
                  " bondingOptions=%s, mtu=%s, bridged=%s, options=%s",
                  network, vlan, bonding, nics, bondingOptions,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55c50269dd3d52fd058951200282c925a7014aca
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>


More information about the vdsm-patches mailing list