Bug 1636507

Summary: [Docs][Admin]Remove bond+bond from supported network bonding scenarios
Product: Red Hat Enterprise Virtualization Manager Reporter: Simone Tiraboschi <stirabos>
Component: DocumentationAssignee: Avital Pinnick <apinnick>
Status: CLOSED CURRENTRELEASE QA Contact: Tahlia Richardson <trichard>
Severity: medium Docs Contact:
Priority: low    
Version: 4.2.7CC: apinnick, danken, dholler, lsurette, mtessun, pkovar, sradco, srevivo, starfall, tburke, ycui
Target Milestone: ovirt-4.3.0Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-19 16:20:10 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:

Description Simone Tiraboschi 2018-10-05 14:55:13 UTC
Description of problem:
According to https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2/html/administration_guide/sect-hosts_and_networking#Bonding_Logic_in_Red_Hat_Enterprise_Virtualization

we are supporting configuration based on bonds over:
NIC + NIC
NIC + Bond
Bond + Bond

But trying to deploy an host bond over bond+bond configuration:
 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond0({'nics': ['bond1', 'bond2'], 'switch': 'legacy', 'options': 'miimon=100 mode=1'})
 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond1({'nics': ['p2p1', 'p2p2', 'p2p3', 'p2p4'], 'switch': 'legacy', 'options': 'miimon=100 mode=4'})
 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond2({'nics': ['p3p1', 'p3p2', 'p3p3', 'p3p4'], 'switch': 'legacy', 'options': 'miimon=100 mode=4'})

validate_network_setup in legacy_switch.py fails since no one of bond0 slaves ('bond1', 'bond2') are in set(netinfo_nics.nics()), the error is:
 MainProcess|jsonrpc/0::ERROR::2018-10-04 21:51:30,428::supervdsm_server::100::SuperVdsm.ServerCallback::(wrapper) Error in setupNetworks
 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/vdsm/supervdsm_server.py", line 98, in wrapper
     res = func(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 210, in setupNetworks
     validator.validate(networks, bondings)
   File "/usr/lib/python2.7/site-packages/vdsm/network/validator.py", line 29, in validate
     netswitch.configurator.validate(networks, bondings)
   File "/usr/lib/python2.7/site-packages/vdsm/network/netswitch/configurator.py", line 127, in validate
     legacy_switch.validate_network_setup(legacy_nets, legacy_bonds)
   File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 598, in validate_network_setup
     'Unknown nics in: %r' % list(nics))
 ConfigNetworkError: (23, "Unknown nics in: ['bond1', 'bond2']")

See:
https://github.com/oVirt/vdsm/blob/ovirt-4.2/lib/vdsm/network/legacy_switch.py#L596

Please note that this piece of code is already different on the master branch:
 https://github.com/oVirt/vdsm/blob/master/lib/vdsm/network/legacy_switch.py#L578



Version-Release number of selected component (if applicable):
4.2.7

How reproducible:
100%

Steps to Reproduce:
1. try deploy from the engine an host with a mode 1 bond over two mode 4 bonds.
2.
3.

Actual results:

 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond0({'nics': ['bond1', 'bond2'], 'switch': 'legacy', 'options': 'miimon=100 mode=1'})
 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond1({'nics': ['p2p1', 'p2p2', 'p2p3', 'p2p4'], 'switch': 'legacy', 'options': 'miimon=100 mode=4'})
 MainProcess|jsonrpc/0::INFO::2018-10-04 21:51:30,291::netconfpersistence::68::root::(setBonding) Adding bond2({'nics': ['p3p1', 'p3p2', 'p3p3', 'p3p4'], 'switch': 'legacy', 'options': 'miimon=100 mode=4'})
...
 MainProcess|jsonrpc/0::ERROR::2018-10-04 21:51:30,428::supervdsm_server::100::SuperVdsm.ServerCallback::(wrapper) Error in setupNetworks
 Traceback (most recent call last):
   File "/usr/lib/python2.7/site-packages/vdsm/supervdsm_server.py", line 98, in wrapper
     res = func(*args, **kwargs)
   File "/usr/lib/python2.7/site-packages/vdsm/network/api.py", line 210, in setupNetworks
     validator.validate(networks, bondings)
   File "/usr/lib/python2.7/site-packages/vdsm/network/validator.py", line 29, in validate
     netswitch.configurator.validate(networks, bondings)
   File "/usr/lib/python2.7/site-packages/vdsm/network/netswitch/configurator.py", line 127, in validate
     legacy_switch.validate_network_setup(legacy_nets, legacy_bonds)
   File "/usr/lib/python2.7/site-packages/vdsm/network/legacy_switch.py", line 598, in validate_network_setup
     'Unknown nics in: %r' % list(nics))
 ConfigNetworkError: (23, "Unknown nics in: ['bond1', 'bond2']")


Expected results:
Successful host deployment

Additional info:

Comment 1 Simone Tiraboschi 2018-10-05 14:56:23 UTC
Bond + nic is probably going to fail as well.

Comment 2 Dan Kenigsberg 2018-10-10 07:36:25 UTC
We do not support and do not want to support (and there is no reason to support) bond over two bonds.

The documentation refers only to the UI. The documentation should be clear about it. Please rename Table 6.6. Bonding Scenarios and Their Results
to Bonding UI creation method

Comment 5 starfall 2018-12-19 03:33:22 UTC
We're also hitting into this issue with a bond interface over vlan subinterfaces (which works fine otherwise).


2018-12-19 01:59:06,121Z ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand] (EE-ManagedThreadFactory-engine-Thread-1) [77aa5e34] Error: VDSGenericException: VDSErrorException: Failed to HostSetupNetworksVDS, error = Unknown nics in: ['enp1s0f0.12', 'enp2s0.12'], code = 23

enp1s0f0.12 and enp2s0.12 are both enslaved to bond12, which is mode active-backup.

It is set up this way as other vlans are using different bonding options.

Comment 6 Dominik Holler 2018-12-19 07:32:05 UTC
(In reply to starfall from comment #5)
> We're also hitting into this issue with a bond interface over vlan
> subinterfaces (which works fine otherwise).
> 
> 
> 2018-12-19 01:59:06,121Z ERROR
> [org.ovirt.engine.core.vdsbroker.vdsbroker.HostSetupNetworksVDSCommand]
> (EE-ManagedThreadFactory-engine-Thread-1) [77aa5e34] Error:
> VDSGenericException: VDSErrorException: Failed to HostSetupNetworksVDS,
> error = Unknown nics in: ['enp1s0f0.12', 'enp2s0.12'], code = 23
> 
> enp1s0f0.12 and enp2s0.12 are both enslaved to bond12, which is mode
> active-backup.
> 
> It is set up this way as other vlans are using different bonding options.

Please note that this setup is not supported, but the hidden_vlans described in
https://bugzilla.redhat.com/show_bug.cgi?id=1650650#c28
might help in your scenario.

Comment 7 starfall 2018-12-23 23:52:12 UTC
Thanks for the pointers, but adding the vlan subinterfaces to hidden_vlans didn't help. VDSM is checking whether the interfaces enslaved to the bond are returned in nics(). The vlan subinterfaces are not returned in nics() whether they are added in hidden_vlans or not.