Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
gerrit-hooks has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 3: * update_tracker: OK * Set MODIFIED::bug 1379115#1379115OK, already on MODIFIED -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Dan Kenigsberg has submitted this change and it was merged. Change subject: net: Use Linux bonds with OVS networks .. net: Use Linux bonds with OVS networks OVS bonds have several major limitations which brings us to use Linux bonds instead. Limitations with OVS bonds: Unable to apply QoS rules and does not support all bond mode options (compared to the Linux bond). Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward HaasSigned-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/63119 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg Reviewed-on: https://gerrit.ovirt.org/64411 --- M lib/vdsm/network/ifacquire.py M lib/vdsm/network/kernelconfig.py M lib/vdsm/network/netswitch.py M lib/vdsm/network/ovs/info.py M lib/vdsm/network/ovs/switch.py M tests/network/ifacquire_test.py M tests/network/nettestlib.py M tests/network/ovs_info_test.py 8 files changed, 160 insertions(+), 60 deletions(-) Approvals: Jenkins CI: Passed CI tests Petr Horáček: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Edward Haas: Verified -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward Haas Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Dan Kenigsberg has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Petr Horáček has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Edward Haas has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 2: Verified+1 Func tests passed -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
gerrit-hooks has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 2: * update_tracker: OK * Check Bug-Url::OK * Check Public Bug::#1379115::OK, public bug * Check Product::#1379115::OK, Correct classification oVirt * Check TM::#1379115::OK, correct target milestone ovirt-4.0.5 * Check merged to previous::OK, change not open on any previous branch -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
gerrit-hooks has posted comments on this change. Change subject: net: Use Linux bonds with OVS networks .. Patch Set 1: * #1379115::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1379115::OK, public bug * Check Product::#1379115::OK, Correct classification oVirt * Check TM::#1379115::OK, correct target milestone ovirt-4.0.5 * Check merged to previous::OK, change not open on any previous branch -- To view, visit https://gerrit.ovirt.org/64411 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-4.0 Gerrit-Owner: Edward HaasGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[ovirt-4.0]: net: Use Linux bonds with OVS networks
Hello Petr Horáček, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/64411 to review the following change. Change subject: net: Use Linux bonds with OVS networks .. net: Use Linux bonds with OVS networks OVS bonds have several major limitations which brings us to use Linux bonds instead. Limitations with OVS bonds: Unable to apply QoS rules and does not support all bond mode options (compared to the Linux bond). Change-Id: I6aeff335949a6e2996f7c3faa524df784dff1b01 Bug-Url: https://bugzilla.redhat.com/1379115 Signed-off-by: Edward HaasSigned-off-by: Petr Horáček Reviewed-on: https://gerrit.ovirt.org/63119 Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg --- M lib/vdsm/network/ifacquire.py M lib/vdsm/network/kernelconfig.py M lib/vdsm/network/netswitch.py M lib/vdsm/network/ovs/info.py M lib/vdsm/network/ovs/switch.py M tests/network/ifacquire_test.py M tests/network/nettestlib.py M tests/network/ovs_info_test.py 8 files changed, 160 insertions(+), 60 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/11/64411/1 diff --git a/lib/vdsm/network/ifacquire.py b/lib/vdsm/network/ifacquire.py index dc4f2f7..f4e2849 100644 --- a/lib/vdsm/network/ifacquire.py +++ b/lib/vdsm/network/ifacquire.py @@ -28,6 +28,7 @@ from .configurators import ifcfg from .ip import address from .ip import dhclient +from .link import iface as linkiface ACQUIRED_IFCFG_TAG = u'# This device is now owned by VDSM.\n' @@ -137,6 +138,8 @@ def _release_non_ifcfg_iface(iface): +if not linkiface.exists(iface): +return # TODO: Tell NetworkManager to unmanage this iface. dhclient.kill(iface, family=4) dhclient.kill(iface, family=6) diff --git a/lib/vdsm/network/kernelconfig.py b/lib/vdsm/network/kernelconfig.py index abb73cf..11bed30 100644 --- a/lib/vdsm/network/kernelconfig.py +++ b/lib/vdsm/network/kernelconfig.py @@ -204,12 +204,8 @@ # TODO: globalize default bond options from Bond in models.py normalized_opts = _parse_bond_options( bond_attr.get('options')) -if "mode" not in normalized_opts: -if bond_attr.get('switch') == 'ovs': -# Mode 0 is not available in OVS. -normalized_opts["mode"] = '1' -else: -normalized_opts["mode"] = '0' +if 'mode' not in normalized_opts: +normalized_opts['mode'] = '0' normalized_opts.pop('custom', None) bond_attr['options'] = bonding.bondOptsForIfcfg(normalized_opts) # before d18e2f10 bondingOptions were also part of networks, so in case diff --git a/lib/vdsm/network/netswitch.py b/lib/vdsm/network/netswitch.py index 473aeed..70d2cd6 100644 --- a/lib/vdsm/network/netswitch.py +++ b/lib/vdsm/network/netswitch.py @@ -26,6 +26,8 @@ from vdsm.network.ip import dhclient from vdsm.network.libvirt import networks as libvirt_nets from vdsm.network.link import iface +from vdsm.network.link.bond import Bond +from vdsm.network.link.setup import SetupBonds from vdsm.network.netinfo.cache import (libvirtNets2vdsm, get as netinfo_get, CachingNetInfo) from vdsm.tool.service import service_status @@ -73,6 +75,18 @@ if 'remove' in attrs: running_attrs = running_entries.get(name, {}) switch_type = running_attrs.get('switch') + +# When removing a network/bond, we try to determine its switch +# type from the netinfo report. +# This is not always possible, specifically with bonds owned by ovs +# but not successfully deployed (not saved in running config). +if (switch_type == legacy_switch.SWITCH_TYPE and +Bond(name).exists() and +not legacy_switch.ConfiguratorClass.owned_device(name)): +# If not owned by Legacy, assume OVS and let it be removed in +# the OVS way. +switch_type = ovs_switch.SWITCH_TYPE + else: switch_type = attrs['switch'] store_entry(name, attrs, switch_type) @@ -144,24 +158,31 @@ def _setup_ovs(networks, bondings, options, in_rollback): _ovs_info = ovs_info.OvsInfo() ovs_netinfo = ovs_info.create_netinfo(_ovs_info) +_netinfo = netinfo() nets2add, nets2edit, nets2remove = _split_setup_actions( networks, ovs_netinfo['networks']) bonds2add, bonds2edit, bonds2remove = _split_setup_actions( -bondings, ovs_netinfo['bondings']) +bondings, _netinfo['bondings']) # TODO: If a nework is to be edited, we remove it and recreate again. # We should implement editation. nets2add.update(nets2edit) nets2remove.update(nets2edit) +# FIXME: we are not able to move a nic from bond to network in one