Bug 2142003

Summary: Add "controller" field to interface to attach to bridge, bond.
Product: Red Hat Enterprise Linux 9 Reporter: Gris Ge <fge>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: low    
Version: 9.1CC: ellorent, ferferna, jiji, jishi, mshi, network-qe, sfaye, till
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nmstate-2.2.2-0.alpha.20221201.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2141999 Environment:
Last Closed: 2023-05-09 07:31:50 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: 2141999    
Bug Blocks:    

Description Gris Ge 2022-11-11 11:37:30 UTC
+++ This bug was initially created as a clone of Bug #2141999 +++

Description of problem:

Right now adding a port a bridge means modify the "port" field of the bridge so the previous port has to be also included or they will be removed.

We can add a "controller" field to interfaces to they just  get attached to the bridge, port.

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


How reproducible: Always


Steps to Reproduce:
1. Add a interface as a new bridge port modifying the bridge "port" field with just the interface

Actual results:
The other ports get removed


Expected results:
It should merge it with the ports or we should have a controller field at interfaces.


Additional info:

Comment 1 Fernando F. Mancera 2022-11-15 15:39:00 UTC
I think this is against the declarative and idempotent design. The Nmstate output state won't be the same than the desired state. IMO, this fits better in NMPolicy as they do not follow these rules. What do you think?

Comment 2 Gris Ge 2022-11-16 03:22:20 UTC
I don't get it why it cannot be declarative and idempotent, could you elaborate?


```yaml
---
interfaces:
- name: eth1
  state: up
  controller: br0
```

Comment 6 Mingyu Shi 2023-02-03 06:56:15 UTC
Verified with:
nmstate-2.2.5-1.el9.x86_64
nispor-1.2.9-1.el9.x86_64
NetworkManager-1.41.90-1.el9.x86_64
openvswitch2.15-2.15.0-79.el9fdp.x86_64
DISTRO=RHEL-9.2.0-20230127.12

Comment 8 errata-xmlrpc 2023-05-09 07:31:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nmstate bug fix and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2023:2190