Bug 1801794

Summary: 'active_slave' attribute is not reported for a newly created bond in mode 1
Product: [oVirt] ovirt-engine Reporter: msheena
Component: BLL.NetworkAssignee: Dominik Holler <dholler>
Status: CLOSED CURRENTRELEASE QA Contact: msheena
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: aoconnor, bugs, dholler, eraviv, lsvaty, mburman
Target Milestone: ovirt-4.4.1Keywords: Automation, AutomationBlocker, Regression
Target Release: ---Flags: pm-rhel: ovirt-4.4+
aoconnor: blocker+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: vdsm-4.40.15 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-08 08:25:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1671876    
Bug Blocks:    

Description msheena 2020-02-11 16:11:59 UTC
Description of problem
======================
Given I have a host with a bond in mode 1 made of 2 slaves
When I perform a request via REST API such as:

GET /ovirt-engine/api/hosts/<host_ID>/nics/<bond_ID>

Then the response does not contain the 'active_slave' attribute.

Version-Release number of selected component (if applicable)
============================================================
ovirt-engine-4.4.0-0.19.master.el7.noarch

How reproducible
================
100%

Steps to Reproduce
==================
1. Create a bond with 2 slaves and mode '1' (active-backup).
2. Query the REST API for the bond object

Actual results
==============
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<host_nic href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/c5585b08-6c82-4625-b86e-67e547fef7ba" id="c5585b08-6c82-4625-b86e-67e547fef7ba">
    <actions/>
    <name>bond0</name>
    <link href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/c5585b08-6c82-4625-b86e-67e547fef7ba/networklabels" rel="networklabels"/>
    <link href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/c5585b08-6c82-4625-b86e-67e547fef7ba/networkattachments" rel="networkattachments"/>
    <link href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/c5585b08-6c82-4625-b86e-67e547fef7ba/statistics" rel="statistics"/>
    <bonding>
        <options>
            <option>
                <name>mode</name>
                <type>Active-Backup</type>
                <value>1</value>
            </option>
            <option>
                <name>miimon</name>
                <value>100</value>
            </option>
        </options>
        <slaves>
            <host_nic href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/7da91c2c-6519-4650-9a36-81ad1fc3a6eb" id="7da91c2c-6519-4650-9a36-81ad1fc3a6eb"/>
            <host_nic href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8/nics/c378474c-087c-45f9-b58e-3d1f20e8346c" id="c378474c-087c-45f9-b58e-3d1f20e8346c"/>
        </slaves>
    </bonding>
    <boot_protocol>none</boot_protocol>
    <bridged>false</bridged>
    <ipv6_boot_protocol>none</ipv6_boot_protocol>
    <mac>
        <address>00:25:90:c6:d9:83</address>
    </mac>
    <mtu>1500</mtu>
    <speed>1000000000</speed>
    <status>up</status>
    <host href="/ovirt-engine/api/hosts/c2696d25-0ae1-4bf7-90e8-d92078874fd8" id="c2696d25-0ae1-4bf7-90e8-d92078874fd8"/>
</host_nic>

Expected results
================
The response is expected to contain an 'active_slave' attribute under the 'slaves' attribute, as listed in [1]

[1] - http://ovirt.github.io/ovirt-engine-api-model/4.4/#types/bonding/attributes/slaves

Additional info
===============
It seems that the 'active_slave' attribute is also not reported in webadmin UI in the tooltip.

Comment 1 Dominik Holler 2020-02-11 16:18:43 UTC
Does refreshing the host capabilities manually solve the problem?
If not, can you please attach the vdsm.log and supervdsm.log?

Comment 2 msheena 2020-02-11 16:39:57 UTC
Refreshing capabilities manually does solve this both for UI and REST API, however this does not sort out until a manual refresh is called.

Comment 3 Michael Burman 2020-02-11 16:44:35 UTC
This is a regression.
Always worked for newly bond mode 1.
Doesn't reproduced with NM.
I think this bug caused of the 2 seconds we added per transaction. Doesn't reproduced on other env

Comment 5 RHEL Program Management 2020-02-17 13:00:12 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 7 Lukas Svaty 2020-03-24 12:46:42 UTC
Targeting to 4.4.0 due to Regression keyword.

Comment 8 Michael Burman 2020-06-03 14:17:44 UTC
Verified on - rhvm-4.4.1.1-0.5.el8ev.noarch with
vdsm-4.40.18-1.el8ev.x86_64
nmstate-0.2.6-13.el8_2.noarch
NetworkManager-1.22.8-4.el8.x86_64

Comment 9 Sandro Bonazzola 2020-07-08 08:25:44 UTC
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020.

Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.