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:
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.
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.
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).
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.