Bug 1789246

Summary: RFE: Support NetworkManager unmanaged interface
Product: Red Hat Enterprise Linux 8 Reporter: Edward Haas <edwardh>
Component: nmstateAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: danken, ferferna, fge, jiji, jishi, mburman, network-qe, phoracek, rgarcia, till
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 8.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nmstate-0.4.1-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 15:16: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: 1848817    
Bug Blocks: 1825061, 1875967, 1894575    

Description Edward Haas 2020-01-09 07:39:52 UTC
Description of problem:
Reporting the state of an interface that is not managed by NM will not show the current IP addresses stack information, even if there is one.

```
22: dummy99: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether c2:8e:cc:44:4b:20 brd ff:ff:ff:ff:ff:ff
    inet 1.1.1.1/24 scope global dummy99
       valid_lft forever preferred_lft forever
    inet6 fe80::c08e:ccff:fe44:4b20/64 scope link 
       valid_lft forever preferred_lft forever

interfaces:
- name: dummy99
  type: dummy
  state: down
  ipv4:
    enabled: false
  ipv6:
    enabled: false
  mac-address: C2:8E:CC:44:4B:20
  mtu: 1500

```

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


How reproducible:
100%

Steps to Reproduce:
1. Define a new dummy device using ip-link.
2. Define an IP on the dummy device using ip-address.
3. Set NM to unmanage the device using nmcli-device.
4. Report the current state of the device using nmstatectl-show

Actual results:
IP stack information shows as `disabled`.

Expected results:
IP stack information should show the actual state on the kernel.

Additional info:

Comment 3 Dan Kenigsberg 2020-05-22 20:37:34 UTC
I don't know what nispor is it why is it needed. I know that we need this functionality for testing, but I'm not aware of an urgent business requirement.

Eddy may know better.

Comment 4 Edward Haas 2020-05-24 08:47:13 UTC
I hope to see it on upstream earlier than 8.4, perhaps as a plugin in an experimental state.

As we expect NM to manage all networking on the host, I think it is not an urgent production requirement (or at least I cannot think of one).
Said that, it is still an issue as the expectations from the report is to "see" all the host state and not be limited by technicalities like this one.
One may set an interface as not manageable by NM for debugging, and the report will wrongly show its state.

Comment 5 Gris Ge 2020-05-24 17:19:24 UTC
Background story.

The nispor is introduced in order to provide API for full network state via kernel netlink or plugin.

nispor will do the parsing on network state and nmstate will use it for state query.


Thanks for the info. I will move this RFE to 8.4.

Comment 7 Petr Horáček 2020-08-30 14:30:22 UTC
Gris, now with nispor in place, is there any update regarding this BZ?

Comment 9 Gris Ge 2020-08-31 06:06:46 UTC
(In reply to Petr Horáček from comment #7)
> Gris, now with nispor in place, is there any update regarding this BZ?

I am still waiting RCM team to include nispor into next RHEL release where nmstate could depend on.

For the recent upstream 0.4.0 release, bridge/dummy/veth/vlan/vxlan has been supported.
the only remaining work are bond and SR-IOV.

Comment 11 Petr Horáček 2020-10-09 13:13:35 UTC
Thanks Gris. It has been a month, have we heard from RCM?

Comment 12 Gris Ge 2020-10-27 15:25:35 UTC
(In reply to Petr Horáček from comment #11)
> Thanks Gris. It has been a month, have we heard from RCM?

Should be all set now.

Comment 16 Mingyu Shi 2020-11-05 13:54:52 UTC
It works fine on regular linux network devices. veth, dummy, eth, vlan, bridge, vrf and bond were tested.
Now unmanaged team and ovs are not supported, not all properties, at least.

Verified with versions:
NetworkManager-1.28.0-0.1.el8.x86_64
nispor-0.6.1-2.el8.x86_64
nmstate-0.4.1-2.el8.noarch
DISTRO=RHEL-8.4.0-20201103.d.0
Linux hp-dl380g10-02.rhts.eng.pek2.redhat.com 4.18.0-241.el8.dt1.x86_64 #1 SMP Mon Nov 2 08:24:31 EST 2020 x86_64 x86_64 x86_64 GNU/Linux

The test case added.

Comment 17 Till Maas 2020-11-06 08:11:44 UTC
(In reply to Mingyu Shi from comment #16)
> It works fine on regular linux network devices. veth, dummy, eth, vlan,
> bridge, vrf and bond were tested.
> Now unmanaged team and ovs are not supported, not all properties, at least.

Gris, is it intended/documented that team and ovs are not supported to be unmanaged?

Comment 18 Gris Ge 2020-11-09 14:15:04 UTC
(In reply to Till Maas from comment #17)
> (In reply to Mingyu Shi from comment #16)
> > It works fine on regular linux network devices. veth, dummy, eth, vlan,
> > bridge, vrf and bond were tested.
> > Now unmanaged team and ovs are not supported, not all properties, at least.
> 
> Gris, is it intended/documented that team and ovs are not supported to be
> unmanaged?

Yes. Supporting NetworkManager unmanaged OVS/team interface require a lot effort.
Without real use case, I would like to postpone it.


The document is at:
 * https://www.nmstate.io/devel/api.html#limitations-of-team-interface
 * https://www.nmstate.io/devel/api.html#limitations-of-openvswitch-interfaces
and

Comment 20 errata-xmlrpc 2021-05-18 15:16:54 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-2021:1748