Bug 1276445 - GetCapabilities returns incorrect bonding opts for bond mode 0
GetCapabilities returns incorrect bonding opts for bond mode 0
Status: CLOSED CURRENTRELEASE
Product: vdsm
Classification: oVirt
Component: Core (Show other bugs)
4.17.11
All Unspecified
medium Severity medium (vote)
: ovirt-3.6.2
: 4.17.15
Assigned To: Sagi Shnaidman
Meni Yakove
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-29 13:51 EDT by Marcin Mirecki
Modified: 2016-02-18 06:02 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-18 06:02:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
ylavi: planning_ack+
danken: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 49550 master ABANDONED vm: always return bond mode in Host.getCapabilities Never
oVirt gerrit 49580 master MERGED Always propagate bonding mode to engine 2015-12-20 09:16 EST
oVirt gerrit 50792 ovirt-3.6 ABANDONED Always propagate bonding mode to engine 2015-12-21 05:43 EST
oVirt gerrit 50793 ovirt-3.6 MERGED Always propagate bonding mode to engine 2015-12-22 07:35 EST

  None (edit)
Description Marcin Mirecki 2015-10-29 13:51:52 EDT
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 04:21:46 EST
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 05:20:38 EST
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 09:48:31 EST
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 04:36:42 EST
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.