Bug 2117704 - engine setup networks fails when bridge_opts contains stp_state=0
Summary: engine setup networks fails when bridge_opts contains stp_state=0
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.5.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.5.3
: ---
Assignee: eraviv
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 2116119
TreeView+ depends on / blocked
 
Reported: 2022-08-11 16:29 UTC by eraviv
Modified: 2022-09-08 09:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-08 09:24:02 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-47839 0 None None None 2022-08-18 07:45:09 UTC

Description eraviv 2022-08-11 16:29:38 UTC
Description of problem:
When trying to apply bridge option STP to enabled false, nmstate responds with verification error. unfortunately this is intermittent.

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

centos 8 stream with:
~~~~~~~~~~~~~~~~~~~~~
# rpm -q NetworkManager nmstate nispor
NetworkManager-1.39.10-1.el8.x86_64
nmstate-1.3.2-1.el8.x86_64
nispor-1.2.7-1.el8.x86_64

# cat /etc/*release
CentOS Stream release 8


rhel 8.6 with:
~~~~~~~~~~~~~~
# rpm -q NetworkManager nmstate nispor
NetworkManager-1.36.0-7.el8_6.x86_64
nmstate-1.2.1-3.el8_6.x86_64
nispor-1.2.3-1.el8.x86_64

# cat /etc/*release
NAME="Red Hat Enterprise Linux"
VERSION="8.6 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"

Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.2.1', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 74, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 355, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 419, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 89, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 122, in _apply_ifaces_state
    plugin.apply_changes(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/plugin.py", line 233, in apply_changes
    NmProfiles(self.context).apply_config(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profiles.py", line 98, in apply_config
    profile.do_action(action)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profile.py", line 469, in do_action
    self._activate()
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profile.py", line 394, in _activate
    self._import_nm_profile_by_simple_conn()
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profile.py", line 522, in _import_nm_profile_by_simple_conn
    if nm_profile.get_uuid() == self._nm_simple_conn.get_uuid():
AttributeError: 'NoneType' object has no attribute 'get_uuid'



How reproducible:
100%

Steps to Reproduce:
1. create bridge with e.g. `brctl addbr br0`
2. nmstatectl show br0 > br0.yml
3. toggle stp/enabled in br0.yml
4. nmstatectl apply br0.yml
--> failure as above
5. for comparison, brctl stp br0 yes\no works without issues

Actual results:
failures as above

Expected results:
/sys/class/net/br0/bridge/stp_state and nmstatectl show should reflect the applied setting.

Additional info:

Comment 1 Gris Ge 2022-08-15 12:53:44 UTC
The verification error only happens on CentOS 8 Stream with early unstable NM. After upgrade to NetworkManager-1.39.10-1.el8, problem gone.

For AttributeError on RHEL 8.6, it is caused by desire state has `br0` interface marked as `state: down` but still changing the stp state, this is not supported use case in RHEL 8.6. User need to mark the interface `state: up` when modifying its config.

Comment 2 eraviv 2022-08-18 07:40:21 UTC
With a bridge created by brctl and state UP the verification and assertion errors do not reproduce over 

c8s
NetworkManager-1.39.10-1.el8.x86_64
nispor-1.2.7-1.el8.x86_64
nmstate-1.3.2-1.el8.x86_64

rhel 8.6
NetworkManager-1.36.0-7.el8_6.x86_64
nispor-1.2.3-1.el8.x86_64
nmstate-1.2.1-3.el8_6.x86_64

But the issue still reproduces when the bridge is created and then updated via ovirt-engine.
So moving the bug to ovirt and assigning myself.

Comment 5 Casper (RHV QE bot) 2022-09-07 08:31:00 UTC
This bug has low overall severity and is not going to be further verified by QE. If you believe special care is required, feel free to properly align relevant severity, flags and keywords to raise PM_Score or use one of the Bumps ('PrioBumpField', 'PrioBumpGSS', 'PrioBumpPM', 'PrioBumpQA') in Keywords to raise it's PM_Score above verification threashold (1000).

Comment 6 eraviv 2022-09-07 08:40:41 UTC
After some digging found that engine supports toggle of STP on a logical network via REST API only like so:
1. toggle the stp attribute on the *data center network*
(note: network attachment does not go of sync after refresh caps)
2. execute setup networks for the corresponding network attachments

So we should consider whether to transform this bug to provide this functionality via the UI and display out of sync, or close as NOTABUG.


Note You need to log in before you can comment on or make changes to this bug.