Dan Kenigsberg has uploaded a new change for review.
Change subject: Revert "net/api: drop support for legacy mgmt networks"
......................................................................
Revert "net/api: drop support for legacy mgmt networks"
This reverts commit d1e8f872b913e4b0dc222c0d2cc2906e9807f3cb.
We need the reverted code because current Engines does not pass
defaultRoute=True on clusterLevels <= 3.3.
Bug-Url:
https://bugzilla.redhat.com/1259000
Change-Id: Icb308ffae614e8f349652ac2916a2ed284677b9e
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M vdsm/network/api.py
2 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/45712/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 82fc6d1..c9dff39 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -25,6 +25,9 @@
RHEV_ENABLED = False if '@RHEV_TRUE@' else True
+# VDSM management networks
+LEGACY_MANAGEMENT_NETWORKS = ('ovirtmgmt', 'rhevm')
+
# SMBIOS manufacturer
SMBIOS_MANUFACTURER = '@SMBIOS_MANUFACTURER@'
SMBIOS_OSNAME = '@SMBIOS_OSNAME@'
diff --git a/vdsm/network/api.py b/vdsm/network/api.py
index 5b3a905..12639ab 100755
--- a/vdsm/network/api.py
+++ b/vdsm/network/api.py
@@ -87,7 +87,7 @@
bondingOptions=None, nics=None, mtu=None, ipaddr=None,
netmask=None, gateway=None, bootproto=None,
ipv6addr=None, ipv6gateway=None, ipv6autoconf=None,
- dhcpv6=None, defaultRoute=False, _netinfo=None,
+ dhcpv6=None, defaultRoute=None, _netinfo=None,
configurator=None, blockingdhcp=None,
implicitBonding=None, opts=None):
"""
@@ -249,7 +249,7 @@
ipv6addr=None, ipv6gateway=None, ipv6autoconf=None,
force=False, configurator=None, bondingOptions=None,
bridged=True, _netinfo=None, hostQos=None,
- defaultRoute=False, blockingdhcp=False, **options):
+ defaultRoute=None, blockingdhcp=False, **options):
nics = nics or ()
if _netinfo is None:
_netinfo = netinfo.NetInfo()
@@ -288,6 +288,13 @@
for nic in nics:
_validateInterNetworkCompatibility(_netinfo, vlan, nic)
+ # defaultRoute is set either explicitly by the client, OR if we're adding
+ # the management network.
+ # REQUIRED_FOR: clusterLevel<=3.3
+ # remove reference to constants.LEGACY_MANAGEMENT_NETWORKS
+ if defaultRoute is None:
+ defaultRoute = network in constants.LEGACY_MANAGEMENT_NETWORKS
+
logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s,"
" bondingOptions=%s, mtu=%s, bridged=%s, defaultRoute=%s,"
"options=%s", network, vlan, bonding, nics, bondingOptions,
--
To view, visit
https://gerrit.ovirt.org/45712
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb308ffae614e8f349652ac2916a2ed284677b9e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>