Change in vdsm[ovirt-3.6]: Revert "net/api: drop support for legacy mgmt networks"
ibarkan at redhat.com
ibarkan at redhat.com
Wed Sep 16 14:23:53 UTC 2015
Hello Dan Kenigsberg,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/46237
to review the following change.
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 at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/45712
Continuous-Integration: Jenkins CI
Tested-by: Ido Barkan <ibarkan at redhat.com>
Reviewed-by: Ido Barkan <ibarkan at 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/37/46237/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 541786b..a8ba0f9 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 5bd675a..ae4f7bd 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/46237
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb308ffae614e8f349652ac2916a2ed284677b9e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
More information about the vdsm-patches
mailing list