Bug 2052354

Summary: Cannot assign ovs external id to ovs system interface
Product: Red Hat Enterprise Linux 9 Reporter: Gris Ge <fge>
Component: NetworkManagerAssignee: NetworkManager Development Team <nm-team>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 9.3CC: bgalvani, lrintel, rkhan, sfaye, sukulkar, till, vbenes
Target Milestone: rc   
Target Release: ---   
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: 2023-07-11 07:45:16 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:
Attachments:
Description Flags
1.yml none

Description Gris Ge 2022-02-09 04:43:14 UTC
Created attachment 1859974 [details]
1.yml

Description of problem:

When using AddConnection2 dbus method to create an OVS system interface connection, the `ovs-external-ids` setting is ignored.


Version-Release number of selected component (if applicable):
NetworkManager-1.36.0-0.3.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
0. Default install of RHEL 8 with NetworkManager-ovs installed also.
1. git clone https://github.com/nmstate/nmstate.git
2. cd nmstate/rust
3. download attachment as 1.yml
4. sudo ip link add eth1 type veth peer name eth1peer
5. sudo ip link set eth1 up
6. sudo ip link set eth1peer up
7. sudo nmcli device set eth1 managed yes
8. cargo run set 1.yml

Actual results:

nmstate rust fail with verification error.

Expected results:

no failure.

Additional info:

The root cause of this is NetworkManager use ifcfg format for eth1 which does not support ovs external id:

This is the dbus monitor output:

method call time=1644381121.031774 sender=:1.325 ->
destination=org.freedesktop.NetworkManager serial=73
path=/org/freedesktop/NetworkManager/Settings;
interface=org.freedesktop.NetworkManager.Settings; member=AddConnection2
   array [
      dict entry(
         string "connection"
         array [
            dict entry(
               string "id"
               variant                   string "eth1"
            )
            dict entry(
               string "type"
               variant                   string "802-3-ethernet"
            )
            dict entry(
               string "interface-name"
               variant                   string "eth1"
            )
            dict entry(
               string "autoconnect"
               variant                   boolean true
            )
            dict entry(
               string "autoconnect-slaves"
               variant                   int32 -1
            )
            dict entry(
               string "master"
               variant                   string "469bf075-a787-4498-9c88-dc2d566abab7"
            )
            dict entry(
               string "slave-type"
               variant                   string "ovs-port"
            )
            dict entry(
               string "uuid"
               variant                   string "2367c13b-da27-44cf-ae04-8aa781453f49"
            )
         ]
      )
      dict entry(
         string "ovs-external-ids"
         array [
            dict entry(
               string "data"
               variant                   array [
                     dict entry(
                        string "gris"
                        string "abc"
                     )
                  ]
            )
         ]
      )
   ]
   uint32 33
   array [
   ]
signal time=1644381121.032761 sender=:1.264 -> destination=(null destination)
serial=4179 path=/org/freedesktop;
interface=org.freedesktop.DBus.ObjectManager; member=InterfacesAdded
   object path "/org/freedesktop/NetworkManager/Settings/22"
   array [
      dict entry(
         string "org.freedesktop.NetworkManager.Settings.Connection"
         array [
            dict entry(
               string "Unsaved"
               variant                   boolean false
            )
            dict entry(
               string "Flags"
               variant                   uint32 0
            )
            dict entry(
               string "Filename"
               variant                   string "/etc/sysconfig/network-scripts/ifcfg-eth1"
            )
         ]
      )
   ]

Comment 1 Gris Ge 2022-02-09 04:46:43 UTC
Once nmcli support ovs external ids, the reproducer could be much simpler.