Bug 1811389

Summary: After bond break(1 or 4) the NIC slaves have the same MAC addresses
Product: Red Hat Enterprise Linux 8 Reporter: Michael Burman <mburman>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED DUPLICATE QA Contact: Mingyu Shi <mshi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 8.2CC: dholler, edwardh, ferferna, jiji, jishi, network-qe, till, yadu
Target Milestone: rcKeywords: AutomationBlocker
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-09 12:29:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1809330, 1810550    

Description Michael Burman 2020-03-08 09:35:05 UTC
Description of problem:
nmstate can't create bond modes 5 and 6

There is a new regression and nmstate can't create the desired connections for bond modes 5 and 6 any more. 

MainProcess|jsonrpc/2::INFO::2020-03-08 05:24:43,235::configurator::192::root::(_setup_nmstate) Desired state: {'interfaces': [{'name': 'bond0', 'type': 'bond', 'state': '
up', 'link-aggregation': {'slaves': ['ens4f2', 'ens4f3'], 'options': {'miimon': '100'}, 'mode': 'balance-tlb'}, 'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}}, {'
name': 'ovirtmgmt'}]}

desired
=======
---
name: bond0
type: bond
state: up
ipv4:
  enabled: false
ipv6:
  enabled: false
link-aggregation:
  mode: balance-tlb
  options:
    active_slave: ens4f2
    ad_actor_sys_prio: ''
    ad_user_port_key: ''
    miimon: 100
  slaves:
  - ens4f2
  - ens4f3

current
=======
---
name: bond0
type: bond
state: up
ipv4:
  enabled: false
ipv6:
  enabled: false
link-aggregation:
  mode: balance-tlb
  options:
    active_slave: ens4f2
    ad_actor_sys_prio: ''
    ad_user_port_key: ''
    miimon: 100
  slaves:
  - ens4f2


difference
==========
--- desired
+++ current
@@ -15,6 +15,5 @@
     miimon: 100
   slaves:
   - ens4f2
-  - ens4f3


MainProcess|jsonrpc/7::INFO::2020-03-08 05:33:10,137::configurator::192::root::(_setup_nmstate) Desired state: {'interfaces': [{'name': 'bond0', 'type': 'bond', 'state': '
up', 'link-aggregation': {'slaves': ['ens4f2', 'ens4f3'], 'options': {'miimon': '100'}, 'mode': 'balance-alb'}, 'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}}, {'
name': 'ovirtmgmt'}]}

desired
=======
---
name: bond0
type: bond
state: up
ipv4:
  enabled: false
ipv6:
  enabled: false
link-aggregation:
  mode: balance-alb
  options:
    active_slave: ens4f2
    ad_actor_sys_prio: ''
    ad_user_port_key: ''
    miimon: 100
  slaves:
  - ens4f2
  - ens4f3

current
=======
---
name: bond0
type: bond
state: up
ipv4:
  enabled: false
ipv6:
  enabled: false
link-aggregation:
  mode: balance-alb
  options:
    active_slave: ens4f2
    ad_actor_sys_prio: ''
    ad_user_port_key: ''
    miimon: 100
  slaves:
  - ens4f2

difference
==========
--- desired
+++ current
@@ -15,6 +15,5 @@
     miimon: 100
   slaves:
   - ens4f2
-  - ens4f3

Version-Release number of selected component (if applicable):
nmstate-0.2.6-1.el8.noarch
NetworkManager-1.22.8-3.el8.x86_64
vdsm-4.40.5-1.el8ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Try to create bond mode 5 or 6 using nmstate

Actual results:
nmstate failed to create the desired connection

Expected results:
Must work as expected

Additional info:
Blocks the work around for the next bugs:
BZ 1809330
BZ 1810550

NOte that creations of bond modes 5 and 6 wroked in previous nmstate versions.

Comment 1 Gris Ge 2020-03-09 07:39:02 UTC
Hi Michael,

Creation both for mode 5 and mode 6 works well in my RHEL 8.2(NetworkManager-1.22.8-3.el8 and nmstate-0.2.6-2.7.el8).

From the output you provide, it seems you are editing existing bond instead of creating now.

Could test again and provide me the whole output?

Thank you.

Comment 2 Michael Burman 2020-03-09 08:37:07 UTC
(In reply to Gris Ge from comment #1)
> Hi Michael,
> 
> Creation both for mode 5 and mode 6 works well in my RHEL
> 8.2(NetworkManager-1.22.8-3.el8 and nmstate-0.2.6-2.7.el8).
> 
> From the output you provide, it seems you are editing existing bond instead
> of creating now.
> 
> Could test again and provide me the whole output?
> 
> Thank you.

HI Gris
pls contact me. this is 100 reproduced on all my machines. I'm not trying to edit exist bond, I'm trying to create new.

Comment 4 Gris Ge 2020-03-09 09:40:33 UTC
Removed the regression flag as it's not a regression issue.

The workaround is marking the slave interface as `absent` when deleting the bond.


RHV team agreed to move this fix to RHEL 8.2.1

Comment 5 Till Maas 2020-03-09 09:43:49 UTC
(In reply to Gris Ge from comment #4)
> Removed the regression flag as it's not a regression issue.
> 
> The workaround is marking the slave interface as `absent` when deleting the
> bond.

Isn't this the intended behavior/workflow, see:

https://github.com/nmstate/nmstate/pull/796


> RHV team agreed to move this fix to RHEL 8.2.1

Comment 7 Gris Ge 2020-03-09 12:29:54 UTC
The patch fixing bug #1809330 will also got this covered.
Both bug are impacted by the same root cause.

Closing as duplicate.

*** This bug has been marked as a duplicate of bug 1809330 ***