Bug 1276445 - GetCapabilities returns incorrect bonding opts for bond mode 0
Summary: GetCapabilities returns incorrect bonding opts for bond mode 0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.17.11
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: ovirt-3.6.2
: 4.17.15
Assignee: Sagi Shnaidman
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-29 17:51 UTC by Marcin Mirecki
Modified: 2016-02-18 11:02 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:02:31 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-3.6.z+
ylavi: planning_ack+
danken: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 49550 0 master ABANDONED vm: always return bond mode in Host.getCapabilities Never
oVirt gerrit 49580 0 master MERGED Always propagate bonding mode to engine 2015-12-20 14:16:00 UTC
oVirt gerrit 50792 0 ovirt-3.6 ABANDONED Always propagate bonding mode to engine 2015-12-21 10:43:33 UTC
oVirt gerrit 50793 0 ovirt-3.6 MERGED Always propagate bonding mode to engine 2015-12-22 12:35:00 UTC

Description Marcin Mirecki 2015-10-29 17:51:52 UTC
Description of problem:

When the engine makes a call to "Host.getCapabilities", vdsm returns an incorrect value for bonding opts, when a bond in mode 0 is present.

The value in the GetCaps reply of a bond in mode 0 is:
bond0={ipv4addrs=[Ljava.lang.Object;@32efd948, addr=, cfg={IPV6INIT=no, HOTPLUG=no, NM_CONTROLLED=no, BOOTPROTO=none, BONDING_OPTS=mode=0 miimon=100, DEVICE=bond0, ONBOOT=yes}, ipv6addrs=[Ljava.lang.Object;@12eaa312, active_slave=, mtu=1500, dhcpv4=false, netmask=, dhcpv6=false, slaves=[Ljava.lang.Object;@1ff456ea, hwaddr=52:54:00:d1:3d:c8, ipv6gateway=::, gateway=, opts={miimon=100}}

where a bond with mode 2 is:
bond1={ipv4addrs=[Ljava.lang.Object;@32efd948, addr=, cfg={BRIDGE=vmnet, IPV6INIT=no, HOTPLUG=no, MTU=1500, NM_CONTROLLED=no, BOOTPROTO=none, BONDING_OPTS=mode=2 miimon=100, DEVICE=bond1, ONBOOT=yes}, ipv6addrs=[Ljava.lang.Object;@76feb366, active_slave=, mtu=1500, dhcpv4=false, netmask=, dhcpv6=false, slaves=[Ljava.lang.Object;@2f92d7da, hwaddr=52:54:00:ad:a5:f6, ipv6gateway=::, gateway=, opts={miimon=100, mode=2}}

The values for BONDING_OPTS in ifcfg files for the bonds:
bond0: BONDING_OPTS='mode=0 miimon=100'
bond1: BONDING_OPTS='mode=2 miimon=100'

The values for the opts parameters in the GetCaps replies is:
bond0: opts={miimon=100}
bond1: opts={miimon=100, mode=2}

This caues a problem on the engine when the bonding options are updated.

Notice that GetCaps also retrieves BONDING_OPTS, which is correct in both cases. This allows for an easy work around in the engine, as this can be used. If so, maybe the 'opts' can be dropped to avoid sending duplicated values.

Comment 1 Ondřej Svoboda 2015-11-03 09:21:46 UTC
The symptom here is that "mode=0" is not reported in the 'opts' map/dictionary because "0" is the default value for the bonding mode.

How does this affect the engine?

Comment 2 Marcin Mirecki 2015-11-03 10:20:38 UTC
The engine is trying to parse the mode. If it detects a mode, it sets the the bond options as one of the 7 defined modes. 
If there is no mode information, the bond options as custom (which we do not want).

Comment 3 Barak Korren 2015-12-29 14:48:31 UTC
RHEV build 3.6.2-3 released
http://bob.eng.lab.tlv.redhat.com/builds/3.6/3.6.2-3/

Comment 4 Michael Burman 2016-01-24 09:36:42 UTC
Verified on - vdsm-4.17.18-0.el7ev.noarch


Note You need to log in before you can comment on or make changes to this bug.