RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1985629 - simplify moving ovs port
Summary: simplify moving ovs port
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: beta
: 9.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-24 13:35 UTC by Mingyu Shi
Modified: 2023-05-09 08:19 UTC (History)
6 users (show)

Fixed In Version: nmstate-2.2.2-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:30:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 2150 0 None open ovs: Fix error when moving OVS system interface to linux bridge 2022-12-09 04:43:42 UTC
Red Hat Issue Tracker NMT-521 0 None None None 2023-05-09 00:26:51 UTC
Red Hat Product Errata RHBA-2023:2190 0 None None None 2023-05-09 07:31:13 UTC

Description Mingyu Shi 2021-07-24 13:35:26 UTC
Description of problem:
When moving a port around bond, linux bridge, etc, people don't need to care about the old controller interface when applying the desired state.
Meanwhile, when moving an ovs port to another controller(such as a linux bridge), people have to deal with the ovs bridge(make it absent, or explicitly remove the target ovs port from `port` subtree). Please make it the same method.
Besides, sometimes nmstate gives a wrong reason when moving ovs port failed.

Version-Release number of selected component (if applicable):
nmstate-1.1.0-0.7.alpha7.el8.noarch
nispor-1.1.1-1.el8.x86_64
NetworkManager-1.32.2-1.el8.x86_64
openvswitch2.13-2.13.0-114.el8fdp.x86_64

How reproducible:
100%

Steps to Reproduce:
#step 1
nmstatectl apply << EOF -
interfaces:
- name: ovsbr0
  type: ovs-bridge
  state: up
  bridge:
    port:
    - name: veth0
    - name: ovsbr0
- name: veth0
  type: veth
  state: up
  veth:
    peer: veth0_p
EOF

#step 2, failed on verification
nmstatectl apply << EOF -
interfaces:
- name: br0
  type: linux-bridge
  state: up
  bridge:
    port:
    - name: veth0
EOF

#step 3, failed with wrong reason: "veth0 is already as port for interface br0"
nmstatectl apply << EOF -
interfaces:
- name: br0
  type: linux-bridge
  state: up
  bridge:
    port:
    - name: veth0
- name: ovsbr0
  type: ovs-bridge
  state: up
EOF

Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.1.0', '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 353, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 417, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 87, in apply
    desired_state, ignored_ifnames, current_state, save_to_disk
  File "/usr/lib/python3.6/site-packages/libnmstate/net_state.py", line 51, in __init__
    gen_conf_mode,
  File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 165, in __init__
    self._pre_edit_validation_and_cleanup()
  File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 276, in _pre_edit_validation_and_cleanup
    self._validate_over_booked_port()
  File "/usr/lib/python3.6/site-packages/libnmstate/ifaces/ifaces.py", line 816, in _validate_over_booked_port
    f"Interface {iface.name} port {port_name} is "
libnmstate.error.NmstateValueError: Interface ovsbr0 port veth0 is already as port for interface br0

Actual results:
Failed at step 2 and 3

Expected results:
No failure

Additional info:

Comment 2 Gris Ge 2022-11-28 09:28:23 UTC
This is cosmetic issue. Will only fix in RHEL 9

Comment 3 Gris Ge 2022-12-09 04:43:42 UTC
Patch posted to upstream: https://github.com/nmstate/nmstate/pull/2150

Comment 6 Mingyu Shi 2022-12-21 05:45:38 UTC
Verified with:
nmstate-2.2.2-2.el9.x86_64
NetworkManager-1.41.6-1.el9.x86_64
openvswitch2.15-2.15.0-76.el9fdp.x86_64
DISTRO=RHEL-9.2.0-20221220.0

It fixed step 2 only, but it now makes sense to me, isn't a big issue.
If ovsbr0 is explicitly mentioned in the desired state(step 3), user needs to handle ovsbr0's port list.

Comment 8 errata-xmlrpc 2023-05-09 07:30:59 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


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